Class HMACAlgorithm


  • public class HMACAlgorithm
    extends DigestAlgorithm
    Algorithms for performing HMACs. These can be used to create MessageDigests.
    • Field Detail

      • SHA1

        public static final HMACAlgorithm SHA1
        SHA-X HMAC. This is a Message Authentication Code that uses a symmetric key together with SHA-X digesting to create a form of signature.
    • Constructor Detail

      • HMACAlgorithm

        protected HMACAlgorithm​(int oidIndex,
                                java.lang.String name,
                                OBJECT_IDENTIFIER oid,
                                int outputSize)
    • Method Detail

      • fromOID

        public static HMACAlgorithm fromOID​(OBJECT_IDENTIFIER oid)
                                     throws java.security.NoSuchAlgorithmException
        Looks up the HMAC algorithm with the given OID.
        Parameters:
        oid - OID.
        Returns:
        HMAC algorithm.
        Throws:
        java.security.NoSuchAlgorithmException - If no registered HMAC algorithm has the given OID.