Package org.bouncycastle.crypto.macs

Examples of org.bouncycastle.crypto.macs.HMac


    public static class HashMac
        extends BaseMac
    {
        public HashMac()
        {
            super(new HMac(new RIPEMD160Digest()));
        }
View Full Code Here


    public static class PBEWithHmac
        extends BaseMac
    {
        public PBEWithHmac()
        {
            super(new HMac(new RIPEMD160Digest()), PKCS12, RIPEMD160, 160);
        }
View Full Code Here

    public static class HashMac
        extends BaseMac
    {
        public HashMac()
        {
            super(new HMac(new SHA256Digest()));
        }
View Full Code Here

    public static class HashMac
        extends BaseMac
    {
        public HashMac()
        {
            super(new HMac(new TigerDigest()));
        }
View Full Code Here

    public static class TigerHmac
        extends BaseMac
    {
        public TigerHmac()
        {
            super(new HMac(new TigerDigest()));
        }
View Full Code Here

    public static class PBEWithHashMac
        extends BaseMac
    {
        public PBEWithHashMac()
        {
            super(new HMac(new TigerDigest()), PKCS12, TIGER, 192);
        }
View Full Code Here

    public static class HashMac
        extends BaseMac
    {
        public HashMac()
        {
            super(new HMac(new GOST3411Digest()));
        }
View Full Code Here

    public static class HashMac
        extends BaseMac
    {
        public HashMac()
        {
            super(new HMac(new MD5Digest()));
        }
View Full Code Here

        doTest("ECIES with 256-bit", g, "ECIES", params);

       
        c1 = new IESCipher(new IESEngine(new ECDHBasicAgreement(),
                new KDF2BytesGenerator(new SHA1Digest()),
                new HMac(new SHA1Digest()),
                new PaddedBufferedBlockCipher(new DESEngine())));
       
        c2 = new IESCipher(new IESEngine(new ECDHBasicAgreement(),
                new KDF2BytesGenerator(new SHA1Digest()),
                new HMac(new SHA1Digest()),
                new PaddedBufferedBlockCipher(new DESEngine())))
   
        params = new IESParameterSpec(derivation, encoding, 128, 128);
     
        // Testing ECIES with default curve using DES
View Full Code Here

  private String mUser;

  static String getCheckCode(String secret)
      throws Base32String.DecodingException {
    final byte[] keyBytes = Base32String.decode(secret);
    Mac mac = new HMac(new SHA1Digest());
    mac.init(new KeyParameter(keyBytes));
    PasscodeGenerator pcg = new PasscodeGenerator(mac);
    return pcg.generateResponseCode(0L);
  }
View Full Code Here

TOP

Related Classes of org.bouncycastle.crypto.macs.HMac

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.