encrypt

function encrypt(){
    PWD=$1;
    read CONTENT;
    echo $CONTENT | openssl enc -aes-128-ecb -nosalt -k $PWD -md md5|base64 -w 0;
}

function decrypt(){
    PWD=$1;
    read CONTENT;
    echo $CONTENT|base64 -d | openssl enc -d -aes-128-ecb -nosalt -k $PWD -md md5;
}
posted @ 2021-09-29 21:42  开学五年级了  阅读(318)  评论(0编辑  收藏  举报