Skip to content

Commit

Permalink
[cgo] refs fibercrypto#116 Finalized cipher.encrypt
Browse files Browse the repository at this point in the history
  • Loading branch information
Maykel Arias Torres committed Jan 18, 2020
1 parent 834f0bd commit 221d4ab
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/cgo/cipher.encrypt.scrypt_chacha20poly1305.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,22 @@ import (
"reflect"
"unsafe"

encrypt "github.com/SkycoinProject/skycoin/src/cipher/encrypt"
"github.com/SkycoinProject/skycoin/src/cipher/encrypt"
)

/*
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include "skytypes.h"
#include "skyfee.h"
*/
import "C"

//export SKY_encrypt_ScryptChacha20poly1305_Encrypt
func SKY_encrypt_ScryptChacha20poly1305_Encrypt(_s *C.encrypt__ScryptChacha20poly1305, _data []byte, _password []byte, _arg1 *C.GoSlice_) (____error_code uint32) {

func SKY_encrypt_ScryptChacha20poly1305_Encrypt(_s *C.encrypt__ScryptChacha20poly1305, _data, _password []byte, _arg1 *C.GoSlice_) (____error_code uint32) {
s := *(*encrypt.ScryptChacha20poly1305)(unsafe.Pointer(_s))
data := *(*[]byte)(unsafe.Pointer(&_data))
password := *(*[]byte)(unsafe.Pointer(&_password))
Expand All @@ -31,7 +32,7 @@ func SKY_encrypt_ScryptChacha20poly1305_Encrypt(_s *C.encrypt__ScryptChacha20pol
}

//export SKY_encrypt_ScryptChacha20poly1305_Decrypt
func SKY_encrypt_ScryptChacha20poly1305_Decrypt(_s *C.encrypt__ScryptChacha20poly1305, _data []byte, _password []byte, _arg1 *C.GoSlice_) (____error_code uint32) {
func SKY_encrypt_ScryptChacha20poly1305_Decrypt(_s *C.encrypt__ScryptChacha20poly1305, _data, _password []byte, _arg1 *C.GoSlice_) (____error_code uint32) {
s := *(*encrypt.ScryptChacha20poly1305)(unsafe.Pointer(_s))
data := *(*[]byte)(unsafe.Pointer(&_data))
password := *(*[]byte)(unsafe.Pointer(&_password))
Expand Down

0 comments on commit 221d4ab

Please sign in to comment.