1.1 --- a/MYKeyPair.m Sat Apr 04 20:42:03 2009 -0700
1.2 +++ b/MYKeyPair.m Sat Apr 04 22:56:13 2009 -0700
1.3 @@ -170,7 +170,9 @@
1.4 }
1.5
1.6
1.7 -@synthesize privateKeyRef=_privateKey;
1.8 +- (SecKeyRef) privateKeyRef {
1.9 + return _privateKey;
1.10 +}
1.11
1.12
1.13 - (NSData*) decryptData: (NSData*)data {
1.14 @@ -180,8 +182,9 @@
1.15
1.16 - (NSData*) signData: (NSData*)data {
1.17 Assert(data);
1.18 - uint8_t digest[CC_SHA1_DIGEST_LENGTH];
1.19 - CC_SHA1(data.bytes,data.length, digest);
1.20 + uint8_t digest[CC_SHA256_DIGEST_LENGTH];
1.21 + CC_SHA256(data.bytes,data.length, digest);
1.22 +
1.23 NSData *signature = nil;
1.24 CSSM_CC_HANDLE ccHandle = cssmCreateSignatureContext(_privateKey);
1.25 if (!ccHandle) return nil;