Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim van der Molen committed Aug 2, 2024
1 parent 1280e49 commit 97997d8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions safestorage/decrypt_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ func encryptionKey() ([]byte, error) {

data := C.CFDataGetBytePtr(C.CFDataRef(result))
dataLen := C.CFDataGetLength(C.CFDataRef(result))
key := make([]byte, dataLen)
copy(key, unsafe.Slice((*byte)(data), dataLen))
key := C.GoBytes(unsafe.Pointer(data), C.int(dataLen))

return key, nil
}
Expand Down

0 comments on commit 97997d8

Please sign in to comment.