慕丝7291255
import java.security.MessageDigest;public class Test{public static void main(String[] args) {String t= "abcd";try {MessageDigest md = MessageDigest.getInstance("SHA-256");md.update(t.getBytes("GBK"));for(byte b:md.digest())System.out.format("%02X",b);} catch (Exception e) {e.printStackTrace();}}}=========88D4266FD4E6338D13B845FCF289579D209C897823B9217DA3E161936F031589PHP验证<?phpecho hash('sha256', 'abcd');88d4266fd4e6338d13b845fcf289579d209c897823b9217da3e161936f031589验证无误