?
十五.????
指令
passwd
SYNOPSIS
? ?
? ? openssl passwd [-crypt] [-1] [-apr1] [-salt string] [-in file] [-stdin]
? ?
? ? [-quiet] [-table] {password}
? ?
? ???
? ?
? ?
說明:
? ?
本指令計算用來哈希某個密碼,也可以用來哈希文件內容。
? ?
本指令支持三種哈希算法:
? ? UNIX
系統的標準哈希算法
(crypt)
? ? MD5-based BSD(1)
? ?
? ? OPTIONS
? ?-crypt -1 -apr1
? ?
這三個
option
中任意選擇一個作為哈希算法,缺省的是
-crypt
? ? -salt string
? ?
輸入作為
salt
的字符串。
? ? -in file
? ?
要哈希的文件名稱
? ? -stdin
? ?
從標準輸入讀入密碼
? ? -quiet
? ?
當從標準輸入讀密碼,輸入的密碼太長的時候,程序將自動解短它。這個
option
的
? ? set
將不在情況下發出警告。
? ? -table
? ?
在輸出列的時候
,
先輸出明文的密碼
,
然后輸出一個
TAB,
再輸出哈希值
.
? ?
舉例時間
:
? ? openssl passwd -crypt -salt xx password xxj31ZMTZzkVA.
? ? openssl passwd -1 -salt xxxxxxxx password $1$xxxxxxxx$8XJIcl6ZXqBMCK0qFevqT1.
? ? openssl passwd -apr1 -salt xxxxxxxx password $apr1$xxxxxxxx$dxHfLAsjHkDRmG83UXe8K0