Ai
1 Star 0 Fork 2

BuildOpenSource/busybox

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
cryptpw.tests 1.37 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/sh
# Copyright 2017 by Denys Vlasenko <vda.linux@googlemail.com>
# Licensed under GPLv2, see file LICENSE in this source tree.
. ./testing.sh
# testing "description" "command" "result" "infile" "stdin"
#optional USE_BB_CRYPT
testing "cryptpw des 12" \
"cryptpw -m des QWErty '123456789012345678901234567890'" \
'12MnB3PqfVbMA\n' "" ""
testing "cryptpw des 55" \
"cryptpw -m des QWErty 55" \
'55tgFLtkT1Y72\n' "" ""
testing "cryptpw des zz" \
"cryptpw -m des QWErty zz" \
'zzIZaaXWOkxVk\n' "" ""
#SKIP=
optional USE_BB_CRYPT_SHA
testing "cryptpw sha256" \
"cryptpw -m sha256 QWErty '123456789012345678901234567890'" \
'$5$1234567890123456$5DxfOCmU4vRhtzfsbdK.6wSGMwwVbac7ZkWwusb8Si7\n' "" ""
testing "cryptpw sha256 rounds=99999" \
"cryptpw -m sha256 QWErty 'rounds=99999\$123456789012345678901234567890'" \
'$5$rounds=99999$1234567890123456$aYellycJGZM6AKyVzaQsSrDBdTixubtMnM6J.MN0xM8\n' "" ""
testing "cryptpw sha512" \
"cryptpw -m sha512 QWErty '123456789012345678901234567890'" \
'$6$1234567890123456$KB7QqxFyqmJSWyQYcCuGeFukgz1bPQoipWZf7.9L7z3k8UNTXa6UikbKcUGDc2ANn7DOGmDaroxDgpK16w/RE0\n' "" ""
testing "cryptpw sha512 rounds=99999" \
"cryptpw -m sha512 QWErty 'rounds=99999\$123456789012345678901234567890'" \
'$6$rounds=99999$1234567890123456$BfF6gD6ZjUmwawH5QaAglYAxtU./yvsz0fcQ464l49aMI2DZW3j5ri28CrxK7riPWNpLuUpfaIdY751SBYKUH.\n' "" ""
SKIP=
exit $FAILCOUNT
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/build-open-source/busybox.git
git@gitee.com:build-open-source/busybox.git
build-open-source
busybox
busybox
master

搜索帮助