cryptopals

Matasano's cryptopals challenges (cryptopals.com).
Log | Files | Refs | README | LICENSE

commit 4902acb2dddbe964fc1786e5027cb761e5880532
parent 2415849f54932fdc2a828d975ff6511a84e89e7a
Author: Jared Tobin <jared@jtobin.ca>
Date:   Sat, 20 May 2017 13:29:08 +1200

Serialize to base64.

Diffstat:
Mlib/aes_ecb/src/main.rs | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/aes_ecb/src/main.rs b/lib/aes_ecb/src/main.rs @@ -88,6 +88,9 @@ fn main() { let output = &result[0..decrypted_len]; - println!("{}", String::from_utf8_lossy(output)); + match mode { + Mode::Decrypt => println!("{}", String::from_utf8_lossy(output)), + Mode::Encrypt => println!("{}", base64::encode(output)), + }; }