這個SHA256加密在線工具可以幫助您將一個輸入字符串加密為固定的256位SHA256字符串.
This SHA256 encryption tool helps you to encrypt an input string to a fixed 256-bit SHA256 string.
SHA-256由NSA設計,它是目前最常用的Hash算法. SHA-256用於區塊鍊網絡的兩個部分:生成新的比特幣地址和採礦中使用的算法.
SHA-256, designed by NSA, is the most commonly used Hash algorithm. SHA-256 is used in two parts of the chain network: to generate a new bitcoin address and the algorithm used in mining.
RFC 3174: https://tools.ietf.org/html/rfc3174
Python中的SHA256 (hashlib): https://docs.python.org/3/library/hashlib.html
Java中的SHA256: https://docs.oracle.com/javase/7/docs/api/java/security/MessageDigest.html
SHA256 in Java: PHP中的SHA256: http://php.net/manual/en/function.hash.phpimport hashlib
def sha256_generator(str):
m=hashlib.sha256()
m.update(str.encode())
return m.hexdigest()
import java.math.BigInteger;
import java.security.MessageDigest;
public String generate(String str){
MessageDigest md=MessageDigest.getInstance("SHA-256");
md.update(str.getBytes());
byte[] digest=md.digest();
String result=new BigInteger(1, digest).toString(16).toUpperCase();
return result;
}
root@instance-1:/var/log/apache2# openssl dgst -sha256 access.log
SHA256(access.log)=1c830df491ff2e9dc4043ac9e89a2380cbb621d80331bbddd0cbcb4f6e502cf8
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论