mirror of https://github.com/schollz/croc.git
Handle more errors
This commit is contained in:
parent
e98117a847
commit
87ef13b548
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue