我有一堆MD5哈希密碼,我想將其轉換爲crypt-style MD5。如何將MD5十六進制字符串轉換爲base-64 MD5字符串?
如果我有明文我可以輕鬆地創建兩個:
% echo -n 'testpass' | md5sum
179ad45c6ce2cb97cf1029e212046e81 -
% echo -n 'testpass' | openssl passwd -1 -stdin -salt ''
$1$$JN/baUhJCUwYKagp48tsP0
但我怎麼轉換179ad45c6ce2cb97cf1029e212046e81
到JN/baUhJCUwYKagp48tsP0
?
直到你明白它是什麼,才執行加密。玩這一切你想要的和學習,只是不要把它放到人們所依賴的任何東西上,直到你真的得到它。 – Incognito