开发者

openssl enc is having troubles with single quote ( ' )

开发者 https://www.devze.com 2023-02-21 20:31 出处:网络
I\'m trying to Base 64 encrypt a password using opessl enc, but when the开发者_C百科 password includes a single quote it doesn\'t return anything.

I'm trying to Base 64 encrypt a password using opessl enc, but when the开发者_C百科 password includes a single quote it doesn't return anything.

Do you know a option that i can use to avoid this?

Thanks a lot


Probably shell quoting is tripping you up

sehe@meerkat:~$ base64 <<< "this isn't a problem"
dGhpcyBpc24ndCBhIHByb2JsZW0K
sehe@meerkat:~$ base64 <<< 'this isn't working'

also with openssl:

sehe@meerkat:~$ echo -n "I don't see the \" problem \"" | openssl enc -e -a 
SSBkb24ndCBzZWUgdGhlICIgcHJvYmxlbSAi
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号