aboutsummaryrefslogtreecommitdiff
path: root/crypto/key.go
diff options
context:
space:
mode:
authorJoe Richey joerichey@google.com <joerichey@google.com>2017-07-19 15:40:35 -0700
committerJoe Richey joerichey@google.com <joerichey@google.com>2017-08-22 11:51:31 -0700
commitf3f1d2f98de26e8180c56d87aaad0e4e98fb4e47 (patch)
tree387badf93efa30169fdcff823e1e045dae8f5035 /crypto/key.go
parent17794e94ebe140dc74f93abb8132f5295ee2004e (diff)
Various small nits a helper functions for PAM
Diffstat (limited to 'crypto/key.go')
-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)