Codota Logo
SHA3Digest
Code IndexAdd Codota 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)

  • Common ways to obtain SHA3Digest
private void myMethod () {
SHA3Digest s =
  • Codota Iconnew SHA3Digest(bitLength)
  • Smart code suggestions by Codota
}
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
  • startActivity (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • onCreateOptionsMenu (Activity)
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • BoxLayout (javax.swing)
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now