diff --git a/connect.go b/connect.go index 92d8d98..f66a658 100644 --- a/connect.go +++ b/connect.go @@ -86,7 +86,7 @@ func runClient(connectionType string, codePhrase string) { log.Error(err) return } - log.Debug("writing [%s]", fileName) + log.Debugf("writing %d bytes to %s", len(decrypted), fileName) err = ioutil.WriteFile(fileName, decrypted, 0644) if err != nil { log.Error(err) diff --git a/crypto.go b/crypto.go index 2e5f2cb..b9318a8 100644 --- a/crypto.go +++ b/crypto.go @@ -39,7 +39,7 @@ func Encrypt(plaintext []byte, passphrase string) ([]byte, string, string) { } func Decrypt(data []byte, passphrase string, salt string, iv string) (plaintext []byte, err error) { - return plaintext, nil + return data, nil // saltBytes, _ := hex.DecodeString(salt) // ivBytes, _ := hex.DecodeString(iv) // key, _ := deriveKey(passphrase, saltBytes)