Skip to content

Commit

Permalink
Merge pull request #17 from silkeh/fix-box-open
Browse files Browse the repository at this point in the history
Fix two open functions in crypto_box_easy
  • Loading branch information
redragonx authored Mar 17, 2017
2 parents b5f80f3 + f097f91 commit 23afb70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cryptobox/crypto_box_easy.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func CryptoBoxOpenDetached(c []byte, mac []byte, n []byte, pk []byte, sk []byte)
support.CheckSize(pk, CryptoBoxPublicKeyBytes(), "public key")
support.CheckSize(sk, CryptoBoxSecretKeyBytes(), "secret key")
m := make([]byte, len(c)-CryptoBoxMacBytes())
exit := int(C.crypto_box_detached(
exit := int(C.crypto_box_open_detached(
(*C.uchar)(&m[0]),
(*C.uchar)(&c[0]),
(*C.uchar)(&mac[0]),
Expand Down Expand Up @@ -123,7 +123,7 @@ func CryptoBoxOpenEasy(c []byte, n []byte, pk []byte, sk []byte) ([]byte, int) {
support.CheckSize(pk, CryptoBoxPublicKeyBytes(), "public key")
support.CheckSize(sk, CryptoBoxSecretKeyBytes(), "secret key")
m := make([]byte, len(c)-CryptoBoxMacBytes())
exit := int(C.crypto_box_easy(
exit := int(C.crypto_box_open_easy(
(*C.uchar)(&m[0]),
(*C.uchar)(&c[0]),
(C.ulonglong)(len(c)),
Expand Down

0 comments on commit 23afb70

Please sign in to comment.