java.lang.Object
org.miaixz.bus.core.lang.wrapper.SimpleWrapper<org.bouncycastle.crypto.Mac>
org.miaixz.bus.crypto.builtin.digest.mac.BCMac
org.miaixz.bus.crypto.builtin.digest.mac.BCHMac
All Implemented Interfaces:
org.miaixz.bus.core.lang.Wrapper<org.bouncycastle.crypto.Mac>, Mac

public class BCHMac extends BCMac
BouncyCastle的HMAC算法实现引擎,使用Mac 实现摘要 当引入BouncyCastle库时自动使用其作为Provider
Since:
Java 17+
Author:
Kimi Liu
  • Field Summary

    Fields inherited from class org.miaixz.bus.core.lang.wrapper.SimpleWrapper

    raw
  • Constructor Summary

    Constructors
    Constructor
    Description
    BCHMac(org.bouncycastle.crypto.Digest digest, byte[] key)
    构造
    BCHMac(org.bouncycastle.crypto.Digest digest, byte[] key, byte[] iv)
    构造
    BCHMac(org.bouncycastle.crypto.Digest digest, org.bouncycastle.crypto.CipherParameters params)
    构造
    BCHMac(org.bouncycastle.crypto.macs.HMac mac, org.bouncycastle.crypto.CipherParameters params)
    构造
  • Method Summary

    Methods inherited from class org.miaixz.bus.crypto.builtin.digest.mac.BCMac

    doFinal, getAlgorithm, getMacLength, reset, update

    Methods inherited from class org.miaixz.bus.core.lang.wrapper.SimpleWrapper

    getRaw

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.miaixz.bus.crypto.builtin.digest.mac.Mac

    digest, update
  • Constructor Details

    • BCHMac

      public BCHMac(org.bouncycastle.crypto.Digest digest, byte[] key, byte[] iv)
      构造
      Parameters:
      digest - 摘要算法,为Digest 的接口实现
      key - 密钥
      iv - 加盐
    • BCHMac

      public BCHMac(org.bouncycastle.crypto.Digest digest, byte[] key)
      构造
      Parameters:
      digest - 摘要算法,为Digest 的接口实现
      key - 密钥
    • BCHMac

      public BCHMac(org.bouncycastle.crypto.Digest digest, org.bouncycastle.crypto.CipherParameters params)
      构造
      Parameters:
      digest - 摘要算法
      params - 参数,例如密钥可以用KeyParameter
    • BCHMac

      public BCHMac(org.bouncycastle.crypto.macs.HMac mac, org.bouncycastle.crypto.CipherParameters params)
      构造
      Parameters:
      mac - HMac
      params - 参数,例如密钥可以用KeyParameter