me.xethh.libs.toolkits.encryption.Sha3Hash Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of commons Show documentation
Show all versions of commons Show documentation
Library of common used tools - major focus on common tools
The newest version!
package me.xethh.libs.toolkits.encryption;
import org.bouncycastle.jcajce.provider.digest.SHA3;
import org.bouncycastle.util.encoders.Hex;
import java.io.ByteArrayInputStream;
import java.util.Base64;
public class Sha3Hash {
public static byte[] hashBytes(byte[] bytes){
return hash(bytes);
}
public static String hashBytes64(byte[] bytes){
return hashBase64(bytes);
}
public static String hashBytesHex(byte[] bytes){
return hashHex(bytes);
}
public static SHA3.Digest512 digest(){
return new SHA3.Digest512();
}
public static byte[] hash(byte[]... bytes){
SHA3.Digest512 digest = digest();
for(int i=0; i