MYKey.m
changeset 28 54b373aa65ab
parent 23 39fec79de6e8
     1.1 --- a/MYKey.m	Sun Jun 07 21:53:56 2009 -0700
     1.2 +++ b/MYKey.m	Fri Aug 07 11:24:53 2009 -0700
     1.3 @@ -33,6 +33,12 @@
     1.4      }
     1.5      self = [self initWithKeyRef: key];
     1.6      CFRelease(key);
     1.7 +    if (self) {
     1.8 +#if MYCRYPTO_USE_IPHONE_API
     1.9 +        if (!keychain)
    1.10 +            self.isPersistent = NO;
    1.11 +#endif
    1.12 +    }
    1.13      return self;
    1.14  }
    1.15  
    1.16 @@ -104,6 +110,12 @@
    1.17          return nil;
    1.18  }
    1.19  
    1.20 +- (unsigned) keySizeInBits {
    1.21 +    const CSSM_KEY *key = self.cssmKey;
    1.22 +    Assert(key);
    1.23 +    return key->KeyHeader.LogicalKeySizeInBits;
    1.24 +}
    1.25 +
    1.26  - (NSString*) name {
    1.27      return [self stringValueOfAttribute: kSecKeyPrintName];
    1.28  }