資源簡介
代碼片段和文件信息
import?java.io.UnsupportedEncodingException;
import?java.security.InvalidKeyException;
import?java.security.MessageDigest;
import?java.security.NoSuchAlgorithmException;
import?java.security.SecureRandom;
import?javax.crypto.BadPaddingException;
import?javax.crypto.Cipher;
import?javax.crypto.IllegalBlockSizeException;
import?javax.crypto.KeyGenerator;
import?javax.crypto.NoSuchPaddingException;
import?javax.crypto.SecretKey;
import?javax.crypto.spec.SecretKeySpec;
import?org.apache.commons.codec.binary.base64;
public?class?Decript?{
/**
?*?SHA1
?*?@param?decript
?*?@return
?*/
public?static?String?SHA1(String?decript)?{
try?{
MessageDigest?digest?=?java.security.MessageDigest
.getInstance(“SHA-1“);
digest.update(decript.getBytes());
b
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????2112410??2014-11-14?14:39??java加密、解密\commons-codec-1.10-bin.zip
?????文件?????558051??2014-11-14?14:39??java加密、解密\commons-codec-1.10-src.zip
?????文件???????5583??2014-11-14?14:41??java加密、解密\Decript.java
?????目錄??????????0??2014-11-14?14:48??java加密、解密
-----------?---------??----------?-----??----
??????????????2676044????????????????????4
評論
共有 條評論