开发者

openssl enc is having troubles with single quote ( ' )

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜