
top.jfunc.common.crypto.digest.Md5 Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-crypto Show documentation
Show all versions of common-crypto Show documentation
encrypt,decrypt interface implements by symmetric,asymmetric,digester
The newest version!
package top.jfunc.common.crypto.digest;
import top.jfunc.common.crypto.Crypto;
import top.jfunc.common.crypto.CryptoException;
import java.security.MessageDigest;
/**
* MD5加密
* @author 熊诗言
*/
public class Md5 extends AbstractDigestCrypto implements Crypto {
@Override
public byte[] encrypt(byte[] src) {
try {
MessageDigest md5 = MessageDigest.getInstance("MD5");
return md5.digest(src);
} catch (Exception e) {
throw new CryptoException(e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy