SHA512加密在线工具
关于SHA512加密在线工具:
这个SHA512加密在线工具可以帮助您将一个输入字符串加密为固定的512位SHA512字符串.
更多关于SHA512的链接:
RFC 4634: https://tools.ietf.org/html/rfc4634
Python中的SHA512 (hashlib): https://docs.python.org/3/library/hashlib.html
Java中的SHA512: https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html
PHP中的SHA512: http://php.net/manual/en/function.hash.php
用Python计算字符串的SHA512哈希值 (用 package hashlib):
import hashlib def sha512_generator(str): m = hashlib.sha512() m.update(str.encode()) return m.hexdigest()
用Java计算字符串的SHA512哈希值 (用 package MessageDigest):
import java.math.BigInteger; import java.security.MessageDigest; public String generate(String str){ MessageDigest md = MessageDigest.getInstance("SHA-512"); md.update(str.getBytes()); byte[] digest = md.digest(); String result = new BigInteger(1, digest).toString(16).toUpperCase(); return result; }
在Linux中计算文件的SHA512哈希值 (用 OpenSSL):
root@instance-1:/var/log/apache2# openssl dgst -sha512 access.log SHA512(access.log)= 767b19c00aea95d53ccf1af4111ab320b14ac48af82f10d4e9984bc2fbe58d7cbe452230211811cf28eabeda4b96134f8654a89023f7ea2a1b722f49e966644f