
com.siashan.toolkit.crypt.digest.HmacAlgorithm Maven / Gradle / Ivy
package com.siashan.toolkit.crypt.digest;
/**
* Hmac算法
*
*
* 注意: 并非所有JCE实现都支持此枚举中的所有算法.
*
* see: https://docs.oracle.com/javase/7/docs/technotes/guides/security/StandardNames.html#Mac
*
* @author siashan
* @since 1.0.7
*/
public enum HmacAlgorithm {
/**
* HmacMD5 算法
*/
HMAC_MD5("HmacMD5"),
/**
* HmacSHA1 算法
*/
HMAC_SHA_1("HmacSHA1"),
/**
* HmacSHA224 算法
*/
HMAC_SHA_224("HmacSHA224"),
/**
* HmacSHA256 算法
*/
HMAC_SHA_256("HmacSHA256"),
/**
* HmacSHA384 算法
*/
HMAC_SHA_384("HmacSHA384"),
/**
* HmacSHA512 算法
*/
HMAC_SHA_512("HmacSHA512")
/** HmacSM3算法实现,需要BouncyCastle库支持 */
// HmacSM3("HmacSM3")
;
private final String name;
private HmacAlgorithm(final String algorithm) {
this.name = algorithm;
}
public String getName() {
return name;
}
@Override
public String toString() {
return name;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy