1 // This file was automatically generated by protocompiler
3 // Compiled from OTPrivateKey.proto
5 #import <Foundation/Foundation.h>
6 #import <ProtocolBuffer/PBCodable.h>
8 typedef NS_ENUM(int32_t, OTPrivateKey_KeyType
) {
9 /** kSecAttrKeyTypeEC */
10 OTPrivateKey_KeyType_EC_NIST_CURVES
= 1,
13 NS_INLINE NSString
*OTPrivateKey_KeyTypeAsString(OTPrivateKey_KeyType value
)
17 case OTPrivateKey_KeyType_EC_NIST_CURVES
: return @
"EC_NIST_CURVES";
18 default: return [NSString stringWithFormat
:@
"(unknown: %i)", value
];
23 NS_INLINE OTPrivateKey_KeyType
StringAsOTPrivateKey_KeyType(NSString
*value
)
25 if ([value isEqualToString
:@
"EC_NIST_CURVES"]) return OTPrivateKey_KeyType_EC_NIST_CURVES
;
26 return OTPrivateKey_KeyType_EC_NIST_CURVES
;
31 #define OTPRIVATEKEY_FUNCTION extern "C" __attribute__((visibility("hidden")))
33 #define OTPRIVATEKEY_FUNCTION extern __attribute__((visibility("hidden")))
36 __attribute__((visibility("hidden")))
37 @interface OTPrivateKey
: PBCodable
<NSCopying
>
40 OTPrivateKey_KeyType _keyType
;
44 @
property (nonatomic
) OTPrivateKey_KeyType keyType
;
45 - (NSString
*)keyTypeAsString
:(OTPrivateKey_KeyType
)value
;
46 - (OTPrivateKey_KeyType
)StringAsKeyType
:(NSString
*)str
;
48 @
property (nonatomic
, retain
) NSData
*keyData
;
50 // Performs a shallow copy into other
51 - (void)copyTo
:(OTPrivateKey
*)other
;
53 // Performs a deep merge from other into self
54 // If set in other, singular values in self are replaced in self
55 // Singular composite values are recursively merged
56 // Repeated values from other are appended to repeated values in self
57 - (void)mergeFrom
:(OTPrivateKey
*)other
;
59 OTPRIVATEKEY_FUNCTION BOOL
OTPrivateKeyReadFrom(__unsafe_unretained OTPrivateKey
*self
, __unsafe_unretained PBDataReader
*reader
);