Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Threema/ThreemaFramework/Utilities/   (Social Medium ©)  Datei vom 26.9.2026 mit Größe 416 B image not shown  

Quelle  CryptoUtils.m  Sprache: unbekannt

 
Spracherkennung für: .m vermutete Sprache: Masm {Masm[63] ABAP[49] Apollo[28]} [Methode: maximale Elemente, drei Dimensionen]

#import "CryptoUtils.h"
#import <CommonCrypto/CommonDigest.h>
#import <CommonCrypto/CommonHMAC.h>
#import "NSString+Hex.h"

@implementation CryptoUtils

+ (NSData*)hmacSha256ForData:(NSData*)data key:(NSData*)key {
    unsigned char hmac[CC_SHA256_DIGEST_LENGTH];
    CCHmac(kCCHmacAlgSHA256, key.bytes, key.length, data.bytes, data.length, hmac);
    return [NSData dataWithBytes:hmac length:sizeof(hmac)];
}

@end

[Dauer der Verarbeitung: 0.7 Sekunden]