cbc41284e23c8c7ed98f589b6d6ebfd6
是swaranga@gmail.com
的MD5加密,而不是SHA-256
SHA加密方式对于swaranga@gmail.com
无效 >>
SHA-1: 3a3be7013e297e28d24979aadc4ae75d84ce0844
SHA-256: 0947300f280d422f4418366931cebcfbd17f5ede1507a951153b0f15a21c10de
SHA-384: 34c01f3956aac32aacae1a6cf67f8a66d441af06c9d36f580ce4be5b234b5399cd879231c49db5bec269309582c19432
SHA-512: db1aa053dd9ee191b091abbcb8bead2ec69a1ab2664bb1deeeedbdb49b25e7bc7680a7659ae88c046afdabf1e35ed0e068763f8754b369bfade69cf21f65d166
SHA-1 (Base64): OjvnAT4pfijSSXmq3ErnXYTOCEQ=
SHA-256 (Base64): CUcwDygNQi9EGDZpMc68+9F/Xt4VB6lRFTsPFaIcEN4=
SHA-384 (Base64): NMAfOVaqwyqsrhps9n+KZtRBrwbJ029YDOS+WyNLU5nNh5IxxJ21vsJpMJWCwZQy
SHA-512 (Base64): 2xqgU92e4ZGwkau8uL6tLsaaGrJmS7He7u29tJsl57x2gKdlmuiMBGr9q/HjXtDgaHY/h1Szab+t5pzyH2XRZg==
如果您确定要使用SHA-256并且需要HEX输出,请尝试以下脚本:
脚本:
use Digest::SHA qw(sha256);
print unpack("H*", sha256('swaranga@gmail.com')), "\n";
或者
use Digest::SHA qw(sha256_hex);
print sha256_hex('swaranga@gmail.com'), "\n";
输出:
0947300f280d422f4418366931cebcfbd17f5ede1507a951153b0f15a21c10de
如果您想使用HEX输出的MD5,则可以尝试使用以下脚本:
脚本:
use Digest::MD5 qw(md5);
print unpack("H*", md5('swaranga@gmail.com')), "\n";
或者
use Digest::MD5 qw(md5_hex);
print md5_hex('swaranga@gmail.com'), "\n";
输出:
cbc41284e23c8c7ed98f589b6d6ebfd6