Tabnine Logo
SHA3Digest
Code IndexAdd Tabnine to your IDE (free)

How to use
SHA3Digest
in
org.spongycastle.crypto.digests

Best Java code snippets using org.spongycastle.crypto.digests.SHA3Digest (Showing top 20 results out of 315)

origin: com.madgag.spongycastle/bcpkix-jdk15on

  public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
  {
    return new SHA3Digest(224);
  }
});
origin: adridadou/eth-contract-api

  private static byte[] doSha3(byte[] message) {
    SHA3Digest digest = new SHA3Digest(BIT_LENGTH);
    byte[] hash = new byte[digest.getDigestSize()];

    if (message.length != 0) {
      digest.update(message, 0, message.length);
    }
    digest.doFinal(hash, 0);
    return hash;
  }
}
origin: biheBlockChain/wkcwallet-java

private static byte[] sha3(byte[] message, int start, int length, SHA3Digest digest, boolean bouncyencoder) {
  byte[] hash = new byte[digest.getDigestSize()];
  if (message.length != 0) {
    digest.update(message, start, length);
  }
  digest.doFinal(hash, 0);
  return hash;
}
origin: com.madgag.spongycastle/core

  static void sha3(byte[] sharedKey)
  {
    SHA3Digest d = new SHA3Digest(256);
    d.update(sharedKey, 0, 32);
    d.doFinal(sharedKey, 0);
  }
}
origin: com.madgag.spongycastle/core

  protected int doFinal(byte[] out, int outOff, byte partialByte, int partialBits)
  {
    if (partialBits < 0 || partialBits > 7)
    {
      throw new IllegalArgumentException("'partialBits' must be in the range [0,7]");
    }

    int finalInput = (partialByte & ((1 << partialBits) - 1)) | (0x02 << partialBits);
    int finalBits = partialBits + 2;

    if (finalBits >= 8)
    {
      absorb(new byte[]{ (byte)finalInput }, 0, 1);
      finalBits -= 8;
      finalInput >>>= 8;
    }

    return super.doFinal(out, outOff, (byte)finalInput, finalBits);
  }
}
origin: nebulasio/neb.java

public static byte[] Sha3256(byte[]... args) {
  SHA3Digest digest = new SHA3Digest();
  for (int i = 0; i < args.length; i++) {
    byte[] bytes = args[i];
    digest.update(bytes, 0, bytes.length);
  }
  byte[] out = new byte[256 / 8];
  digest.doFinal(out, 0);
  return out;
}
origin: biheBlockChain/wkcwallet-java

private static byte[] doSha3(byte[] message, SHA3Digest digest, boolean bouncyencoder) {
  byte[] hash = new byte[digest.getDigestSize()];
  if (message.length != 0) {
    digest.update(message, 0, message.length);
  }
  digest.doFinal(hash, 0);
  return hash;
}
origin: com.madgag.spongycastle/bcpkix-jdk15on

  public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
  {
    return new SHA3Digest(384);
  }
});
origin: biheBlockChain/wkcwallet-java

private static byte[] doSha3(byte[] m1, byte[] m2, SHA3Digest digest, boolean bouncyencoder) {
  byte[] hash = new byte[digest.getDigestSize()];
  digest.update(m1, 0, m1.length);
  digest.update(m2, 0, m2.length);
  digest.doFinal(hash, 0);
  return hash;
}
origin: com.madgag.spongycastle/core

  public static Digest createSHA3_512()
  {
    return new SHA3Digest(512);
  }
}
origin: com.madgag.spongycastle/bcpkix-jdk15on

  public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
  {
    return new SHA3Digest(256);
  }
});
origin: com.madgag.spongycastle/core

public static Digest createSHA3_256()
{
  return new SHA3Digest(256);
}
origin: com.madgag.spongycastle/prov

public DigestSHA3(int size)
{
  super(new SHA3Digest(size));
}
origin: com.madgag.spongycastle/core

public static Digest createSHA3_224()
{
  return new SHA3Digest(224);
}
origin: com.madgag.spongycastle/bcpkix-jdk15on

  public ExtendedDigest get(AlgorithmIdentifier digestAlgorithmIdentifier)
  {
    return new SHA3Digest(512);
  }
});
origin: com.madgag.spongycastle/core

public static Digest createSHA3_384()
{
  return new SHA3Digest(384);
}
origin: com.madgag.spongycastle/prov

  public withSha3_512()
  {
    super(new SHA3Digest(512), new SPHINCS256Signer(new SHA3Digest(256), new SHA3Digest(512)));
  }
}
origin: com.madgag.spongycastle/prov

  public HashMacSHA3(int size)
  {
    super(new HMac(new SHA3Digest(size)));
  }
}
origin: com.madgag.spongycastle/prov

  public Object clone()
    throws CloneNotSupportedException
  {
    BCMessageDigest d = (BCMessageDigest)super.clone();
    d.digest = new SHA3Digest((SHA3Digest)digest);
    return d;
  }
}
origin: biheBlockChain/wkcwallet-java

protected static String sha3String(String message, Size bitSize, boolean bouncyencoder) {
  SHA3Digest digest = new SHA3Digest(bitSize.bits);
  return sha3String(message, digest, bouncyencoder);
}
org.spongycastle.crypto.digestsSHA3Digest

Javadoc

implementation of SHA-3 based on following KeccakNISTInterface.c from http://keccak.noekeon.org/

Following the naming conventions used in the C source code to enable easy review of the implementation.

Most used methods

  • <init>
  • doFinal
  • update
  • getDigestSize
  • absorb
  • absorbBits
  • checkBitLength

Popular in Java

  • Making http requests using okhttp
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • getApplicationContext (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • JTextField (javax.swing)
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now