2017年9月5日 星期二

產生密碼的小幫手 MD5, SHA1, SHA256

md5sum, sha1sum, sha256sum
本來是用來產生檔案的校驗碼
用法大概是這樣(OS:Ubuntu 16.04):

$ md5sum ./hello.txt
$ sha1sum ./hello.txt
$ sha256sum ./hello.txt

分別產生
507e4e0c519ab8c1d614137fff73a191
601b1dfe6a5d2568f28d929773e9baa5166ac49e
ee3d92eb2b5fe219cc512f1cbe49e3a9b745178987e861199d91b0a91b22c57e


最近在弄redis security的時候,看到有人用校驗碼來當密碼產生器,用法如下:
$ echo "aaaa" | md5sum
$ echo "aaaa" | sha1sum
$ echo "aaaa" | sha256sum

分別產生

e5828c564f71fea3a12dde8bd5d27063
7bae8076a5771865123be7112468b79e9d78a640
11a77c3d96c06974b53d7f40a577e6813739eb5c811b2a86f59038ea90add772


這串碼又臭又長又超難背,很適合拿來當密碼。

1 則留言:

  1. That’s why most casinos will allow you to play this and different similar video games. Some casinos provide free spins on in style progressive video games like Mega Fortune Dreams and Mega Moolah. As acknowledged earlier, all casinos have their very own sets of terms that govern if you qualify for a welcome bonus. While some on line casino welcome bonuses are in style, casinos’ administration sees them as a advertising cost for the thecasinosource.com enterprise.

    回覆刪除