Bash 간단한 암호화/복호화

1 개요[ | ]

Bash 간단한 암호화/복호화
암호화
echo "평문" | openssl enc -aes-128-cbc -a -pass pass:"암호화키"
복호화
echo "암호문" | openssl enc -aes-128-cbc -a -pass pass:"암호화키" -d

2 실행예시[ | ]

hello world
root@zetawiki:~# echo "hello world" | openssl enc -aes-128-cbc -a -pass pass:"P@ssw0rd"
U2FsdGVkX194Lh6mIUdFdfWIKqPTG0XrNIvWYFtPm5k=
root@zetawiki:~# echo "U2FsdGVkX194Lh6mIUdFdfWIKqPTG0XrNIvWYFtPm5k=" | openssl enc -aes-128-cbc -a -d -pass pass:"P@ssw0rd"
hello world
★A가あ中
root@zetawiki:~# echo "★A가あ中" | openssl enc -aes-128-cbc -a -pass pass:"P@ssw0rd"
U2FsdGVkX1/k6klwdrMfRX8+OwUVDOx7+yNYvYYOazg=
root@zetawiki:~# echo "★A가あ中" | openssl enc -aes-128-cbc -a -pass pass:"P@ssw0rd"
U2FsdGVkX1+C34SkcHzC/VAsI7h53ulCy27i3t02+Ps=
root@zetawiki:~# echo "U2FsdGVkX1/k6klwdrMfRX8+OwUVDOx7+yNYvYYOazg=" | openssl enc -aes-128-cbc -a -pass pass:"P@ssw0rd" -d
★A가あ中
root@zetawiki:~# echo "U2FsdGVkX1+C34SkcHzC/VAsI7h53ulCy27i3t02+Ps=" | openssl enc -aes-128-cbc -a -pass pass:"P@ssw0rd" -d
★A가あ中

3 같이 보기[ | ]

4 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}