]> git.saurik.com Git - apple/security.git/blob - keychain/SecureObjectSync/SOSTrustedDeviceAttributes.m
Security-59306.11.20.tar.gz
[apple/security.git] / keychain / SecureObjectSync / SOSTrustedDeviceAttributes.m
1 //
2 // SOSTrustedDeviceAttributes.m
3 // Security
4 //
5 //
6
7 #import "SOSTrustedDeviceAttributes.h"
8
9
10 @implementation SOSTrustedDeviceAttributes
11
12 + (BOOL)supportsSecureCoding { return YES; }
13
14 - (instancetype)initWithCoder:(NSCoder *)aDecoder {
15 if(self = [super init]) {
16 _machineID = [aDecoder decodeObjectOfClass:[NSString class] forKey:MACHINEID];
17 _serialNumber = [aDecoder decodeObjectOfClass:[NSString class] forKey:SERIALNUMBER];
18 }
19 return self;
20 }
21
22 - (void)encodeWithCoder:(NSCoder *)coder {
23 [coder encodeObject:_machineID forKey:MACHINEID];
24 [coder encodeObject:_serialNumber forKey:SERIALNUMBER];
25 }
26
27 @end