feat: v0.2.5, show decrytped encrypted-message
This commit is contained in:
@@ -109,7 +109,7 @@ pub fn decrypt_single(config: &Option<TinyEncryptConfig>,
|
|||||||
match util::decode_base64(encrypted_comment) {
|
match util::decode_base64(encrypted_comment) {
|
||||||
Err(e) => warning!("Decode encrypted comment failed: {}", e),
|
Err(e) => warning!("Decode encrypted comment failed: {}", e),
|
||||||
Ok(encrypted_comment_based_bytes) => match aes_gcm_decrypt(&key, &nonce, &encrypted_comment_based_bytes) {
|
Ok(encrypted_comment_based_bytes) => match aes_gcm_decrypt(&key, &nonce, &encrypted_comment_based_bytes) {
|
||||||
Err(e) => warning!("Decode encrypted comment failed: {}", e),
|
Err(e) => warning!("Decrypt encrypted comment failed: {}", e),
|
||||||
Ok(decrypted_comment_bytes) => match String::from_utf8(decrypted_comment_bytes.clone()) {
|
Ok(decrypted_comment_bytes) => match String::from_utf8(decrypted_comment_bytes.clone()) {
|
||||||
Err(_) => success!("Encrypted message hex: {}", hex::encode(&decrypted_comment_bytes)),
|
Err(_) => success!("Encrypted message hex: {}", hex::encode(&decrypted_comment_bytes)),
|
||||||
Ok(message) => success!("Encrypted message: {}", message),
|
Ok(message) => success!("Encrypted message: {}", message),
|
||||||
|
|||||||
Reference in New Issue
Block a user