aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorJoseph Richey <joerichey@google.com>2017-08-24 00:53:11 -0700
committerGitHub <noreply@github.com>2017-08-24 00:53:11 -0700
commit4879df9a6063886865b94c270660838060acbc20 (patch)
tree9adaa99808990c0034484ed24d587c07ac70525d /crypto
parent17794e94ebe140dc74f93abb8132f5295ee2004e (diff)
parent19c13e861996c3503be5b0dc5a2cecfe186b1744 (diff)
Merge pull request #25 from google/fixv0.2.00.2.0
fscrypt PAM module
Diffstat (limited to 'crypto')
-rw-r--r--crypto/key.go1
1 files changed, 0 insertions, 1 deletions
diff --git a/crypto/key.go b/crypto/key.go
index 656e6dc..497a0ef 100644
--- a/crypto/key.go
+++ b/crypto/key.go
@@ -175,7 +175,6 @@ func (key *Key) resize(requestedSize int) (*Key, error) {
// string allocated by C. Note that this method is unsafe as this C copy has no
// locking or wiping functionality. The key shouldn't contain any `\0` bytes.
func (key *Key) UnsafeToCString() unsafe.Pointer {
- // Memory for the key must be moved into a C string allocated by C.
size := C.size_t(key.Len())
data := C.calloc(size+1, 1)
C.memcpy(data, util.Ptr(key.data), size)