1 #include "SecDigestTransform.h"
2 #include "SecCFRelease.h"
7 const CFStringRef kSecDigestMD2
= CFSTR("MD2 Digest"),
8 kSecDigestMD4
= CFSTR("MD4 Digest"),
9 kSecDigestMD5
= CFSTR("MD5 Digest"),
10 kSecDigestSHA1
= CFSTR("SHA1 Digest"),
11 kSecDigestSHA2
= CFSTR("SHA2 Digest Family"),
12 kSecDigestHMACMD5
= CFSTR("HMAC-MD5"),
13 kSecDigestHMACSHA1
= CFSTR("HMAC-SHA1"),
14 kSecDigestHMACSHA2
= CFSTR("HMAC-SHA2 Digest Family");
16 const CFStringRef kSecDigestTypeAttribute
= CFSTR("Digest Type"),
17 kSecDigestLengthAttribute
= CFSTR("Digest Length"),
18 kSecDigestHMACKeyAttribute
= CFSTR("HMAC Key");
20 SecTransformRef
SecDigestTransformCreate(CFTypeRef digestType
,
25 SecTransformRef tr
= DigestTransform::Make();
26 DigestTransform
* dt
= (DigestTransform
*) CoreFoundationHolder::ObjectFromCFType(tr
);
28 CFErrorRef result
= dt
->Setup(digestType
, digestLength
);
48 CFTypeID
SecDigestTransformGetTypeID()
50 return DigestTransform::GetCFTypeID();