NitorCreations / vault

Encrypted AWS key-value storage
0 stars 2 forks source link

rust: output encrypted binary data always as base64 #546

Closed Esgrove closed 3 weeks ago

Esgrove commented 3 weeks ago
➜  rust git:(rust/output-encrypted-base64) ./vault encrypt 'hello world!' -o out.txt

➜  rust git:(rust/output-encrypted-base64) ✗ cat out.txt
AQECAHgN/X7CNJJDsz+LAJDffTM2XHc91tXZLWmwH1WcrX1diAAAAGowaAYJKoZIhvcNAQcGoFswWQIBADBUBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDOR/Edj1mrkrfjS7NAIBEIAnZX7iCdgBgcsX8M6ligcaBT63I4hL8zmgDZBZNLn6Jc7+esdF+88f%            

➜  rust git:(rust/output-encrypted-base64) ✗ ./vault decrypt - < out.txt
hello world!%

➜  rust git:(rust/output-encrypted-base64) ✗ ./vault encrypt 'testing another string'
AQECAHgN/X7CNJJDsz+LAJDffTM2XHc91tXZLWmwH1WcrX1diAAAAHQwcgYJKoZIhvcNAQcGoGUwYwIBADBeBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDLw1bzTmk5bcWslGBAIBEIAxJFGawnqdwRkpwLNnKuDJyBCw9KlQMT4YqeU6Hqary0dnkjWLvBMh2hbsDAp90oGrDw==%

➜  rust git:(rust/output-encrypted-base64) ✗ ./vault decrypt "AQECAHgN/X7CNJJDsz+LAJDffTM2XHc91tXZLWmwH1WcrX1diAAAAHQwcgYJKoZIhvcNAQcGoGUwYwIBADBeBgkqhkiG9w0BBwEwHgYJYIZIAWUDBAEuMBEEDLw1bzTmk5bcWslGBAIBEIAxJFG
awnqdwRkpwLNnKuDJyBCw9KlQMT4YqeU6Hqary0dnkjWLvBMh2hbsDAp90oGrDw=="
testing another string%