mirror of https://github.com/cbeuw/Cloak
Remove debug log
This commit is contained in:
parent
8168b9e2e7
commit
f525643518
|
|
@ -4,7 +4,6 @@ import (
|
||||||
"crypto/aes"
|
"crypto/aes"
|
||||||
"crypto/cipher"
|
"crypto/cipher"
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"log"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type Crypto interface {
|
type Crypto interface {
|
||||||
|
|
@ -48,12 +47,10 @@ func (a *AES) encrypt(plaintext []byte) ([]byte, error) {
|
||||||
ret := make([]byte, 12+len(plaintext)+16)
|
ret := make([]byte, 12+len(plaintext)+16)
|
||||||
copy(ret[:12], nonce)
|
copy(ret[:12], nonce)
|
||||||
copy(ret[12:], ciphertext)
|
copy(ret[12:], ciphertext)
|
||||||
log.Printf("%x\n", ret)
|
|
||||||
return ret, nil
|
return ret, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (a *AES) decrypt(buf []byte) ([]byte, error) {
|
func (a *AES) decrypt(buf []byte) ([]byte, error) {
|
||||||
log.Printf("%x\n", buf)
|
|
||||||
aesgcm, err := cipher.NewGCM(a.cipher)
|
aesgcm, err := cipher.NewGCM(a.cipher)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue