Handle more errors

This commit is contained in:
Zack Scholl 2017-10-17 22:12:35 -06:00
parent e98117a847
commit 87ef13b548
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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)