File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,9 @@ var syncTypeRef = map[Synchronizable]C.CFTypeRef{
209
209
SynchronizableNo : C .CFTypeRef (C .kCFBooleanFalse ),
210
210
}
211
211
212
+ var DataProtectionKey = attrKey (C .CFTypeRef (C .kSecUseDataProtectionKeychain ))
213
+ var dataProtectionYes = C .CFTypeRef (C .kCFBooleanTrue )
214
+
212
215
// Accessible is the items accessibility
213
216
type Accessible int
214
217
@@ -362,6 +365,10 @@ func (k *Item) SetSynchronizable(sync Synchronizable) {
362
365
}
363
366
}
364
367
368
+ func (key * Item ) SetDataProtection () {
369
+ key .attr [DataProtectionKey ] = dataProtectionYes
370
+ }
371
+
365
372
// SetAccessible sets the accessible attribute
366
373
func (k * Item ) SetAccessible (accessible Accessible ) {
367
374
if accessible != AccessibleDefault {
You can’t perform that action at this time.
0 commit comments