openssl簡介-指令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
posted on 2009-11-27 17:40
零全零美 閱讀(535)
評論(0) 編輯 收藏 所屬分類:
安全相關