congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Reading from database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (Timer)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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