@@ -191,20 +191,20 @@ var syncTypeRef = map[Synchronizable]C.CFTypeRef{
191
191
}
192
192
193
193
// DataProtection is the items data protection status
194
- type DataProtection int
194
+ type UseDataProtectionKeychain int
195
195
196
196
const (
197
- // DataProtectionYes enables data protection mode
198
- DataProtectionYes = 1
199
- // DataProtectionNo disables data protection mode
200
- DataProtectionNo = 2
197
+ // UseDataProtectionKeychainYes enables data protection mode
198
+ UseDataProtectionKeychainYes = 1
199
+ // UseDataProtectionKeychainNo disables data protection mode
200
+ UseDataProtectionKeychainNo = 2
201
201
)
202
202
203
203
// DataProtectionKey is the key type for DataProtection
204
- var DataProtectionKey = attrKey (C .CFTypeRef (C .kSecUseDataProtectionKeychain ))
205
- var dataProtectionTypeRef = map [DataProtection ]C.CFTypeRef {
206
- DataProtectionYes : C .CFTypeRef (C .kCFBooleanTrue ),
207
- DataProtectionNo : C .CFTypeRef (C .kCFBooleanFalse ),
204
+ var UseDataProtectionKey = attrKey (C .CFTypeRef (C .kSecUseDataProtectionKeychain ))
205
+ var dataProtectionTypeRef = map [UseDataProtectionKeychain ]C.CFTypeRef {
206
+ UseDataProtectionKeychainYes : C .CFTypeRef (C .kCFBooleanTrue ),
207
+ UseDataProtectionKeychainNo : C .CFTypeRef (C .kCFBooleanFalse ),
208
208
}
209
209
210
210
// Accessible is the items accessibility
@@ -321,8 +321,8 @@ func (k *Item) SetSynchronizable(sync Synchronizable) {
321
321
}
322
322
323
323
// SetSynchronizable sets the synchronizable attribute
324
- func (k * Item ) SetKeychainDataProtection (dataProtection DataProtection ) {
325
- k .attr [DataProtectionKey ] = dataProtectionTypeRef [dataProtection ]
324
+ func (k * Item ) SetUseDataProtectionKeychain (dataProtection UseDataProtectionKeychain ) {
325
+ k .attr [UseDataProtectionKey ] = dataProtectionTypeRef [dataProtection ]
326
326
}
327
327
328
328
// SetAccessible sets the accessible attribute
0 commit comments