|
|
@ -15,7 +15,7 @@ public class DecriptTest { |
|
|
|
MessageDigest digest = MessageDigest |
|
|
|
MessageDigest digest = MessageDigest |
|
|
|
.getInstance("SHA-1"); |
|
|
|
.getInstance("SHA-1"); |
|
|
|
digest.update(decript.getBytes()); |
|
|
|
digest.update(decript.getBytes()); |
|
|
|
byte messageDigest[] = digest.digest(); |
|
|
|
byte[] messageDigest = digest.digest(); |
|
|
|
// Create Hex String
|
|
|
|
// Create Hex String
|
|
|
|
StringBuffer hexString = new StringBuffer(); |
|
|
|
StringBuffer hexString = new StringBuffer(); |
|
|
|
// 字节数组转换为 十六进制 数
|
|
|
|
// 字节数组转换为 十六进制 数
|
|
|
@ -39,7 +39,7 @@ public class DecriptTest { |
|
|
|
MessageDigest digest = MessageDigest |
|
|
|
MessageDigest digest = MessageDigest |
|
|
|
.getInstance("SHA"); |
|
|
|
.getInstance("SHA"); |
|
|
|
digest.update(decript.getBytes()); |
|
|
|
digest.update(decript.getBytes()); |
|
|
|
byte messageDigest[] = digest.digest(); |
|
|
|
byte[] messageDigest= digest.digest(); |
|
|
|
// Create Hex String
|
|
|
|
// Create Hex String
|
|
|
|
StringBuffer hexString = new StringBuffer(); |
|
|
|
StringBuffer hexString = new StringBuffer(); |
|
|
|
// 字节数组转换为 十六进制 数
|
|
|
|
// 字节数组转换为 十六进制 数
|
|
|
|