]> git.saurik.com Git - apple/security.git/blame - keychain/TrustedPeersHelper/proto/generated_source/OTPrivateKey.h
Security-59754.80.3.tar.gz
[apple/security.git] / keychain / TrustedPeersHelper / proto / generated_source / OTPrivateKey.h
CommitLineData
ecaf5866
A
1// This file was automatically generated by protocompiler
2// DO NOT EDIT!
3// Compiled from OTPrivateKey.proto
4
5#import <Foundation/Foundation.h>
6#import <ProtocolBuffer/PBCodable.h>
7
8typedef NS_ENUM(int32_t, OTPrivateKey_KeyType) {
9 /** kSecAttrKeyTypeEC */
10 OTPrivateKey_KeyType_EC_NIST_CURVES = 1,
11};
12#ifdef __OBJC__
13NS_INLINE NSString *OTPrivateKey_KeyTypeAsString(OTPrivateKey_KeyType value)
14{
15 switch (value)
16 {
17 case OTPrivateKey_KeyType_EC_NIST_CURVES: return @"EC_NIST_CURVES";
18 default: return [NSString stringWithFormat:@"(unknown: %i)", value];
19 }
20}
21#endif /* __OBJC__ */
22#ifdef __OBJC__
23NS_INLINE OTPrivateKey_KeyType StringAsOTPrivateKey_KeyType(NSString *value)
24{
25 if ([value isEqualToString:@"EC_NIST_CURVES"]) return OTPrivateKey_KeyType_EC_NIST_CURVES;
26 return OTPrivateKey_KeyType_EC_NIST_CURVES;
27}
28#endif /* __OBJC__ */
29
30#ifdef __cplusplus
31#define OTPRIVATEKEY_FUNCTION extern "C" __attribute__((visibility("hidden")))
32#else
33#define OTPRIVATEKEY_FUNCTION extern __attribute__((visibility("hidden")))
34#endif
35
36__attribute__((visibility("hidden")))
37@interface OTPrivateKey : PBCodable <NSCopying>
38{
39 NSData *_keyData;
40 OTPrivateKey_KeyType _keyType;
41}
42
43
44@property (nonatomic) OTPrivateKey_KeyType keyType;
45- (NSString *)keyTypeAsString:(OTPrivateKey_KeyType)value;
46- (OTPrivateKey_KeyType)StringAsKeyType:(NSString *)str;
47
48@property (nonatomic, retain) NSData *keyData;
49
50// Performs a shallow copy into other
51- (void)copyTo:(OTPrivateKey *)other;
52
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;
58
59OTPRIVATEKEY_FUNCTION BOOL OTPrivateKeyReadFrom(__unsafe_unretained OTPrivateKey *self, __unsafe_unretained PBDataReader *reader);
60
61@end
62