Skip to content

Commit

Permalink
Update wrong pwd error message.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eitu33 committed Jun 21, 2022
1 parent 751474e commit eb4047a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion massa-cipher/src/decrypt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ pub fn decrypt(password: &str, data: &[u8]) -> Result<Vec<u8>, CipherError> {
)
})?,
)
.map_err(|_| CipherError::DecryptionError("wrong password".to_string()))?;
.map_err(|_| {
CipherError::DecryptionError("wrong password or corrupted data".to_string())
})?;
Ok(decrypted_bytes)
}

0 comments on commit eb4047a

Please sign in to comment.