public enum HashAlgo extends Enum<HashAlgo>
| Enum Constant and Description |
|---|
SHA1 |
SHA224 |
SHA256 |
SHA3_224 |
SHA3_256 |
SHA3_384 |
SHA3_512 |
SHA384 |
SHA512 |
SHAKE128 |
SHAKE256 |
SM3 |
| Modifier and Type | Method and Description |
|---|---|
String |
base64Hash(byte[]... datas) |
String |
base64Hash(byte[] data,
int offset,
int len) |
org.bouncycastle.crypto.ExtendedDigest |
createDigest() |
org.bouncycastle.asn1.x509.AlgorithmIdentifier |
getAlgIdWithNullParams() |
org.bouncycastle.asn1.x509.AlgorithmIdentifier |
getAlgorithmIdentifier() |
int |
getEncodedLength() |
static HashAlgo |
getInstance(org.bouncycastle.asn1.x509.AlgorithmIdentifier id) |
static HashAlgo |
getInstance(org.bouncycastle.asn1.ASN1ObjectIdentifier oid) |
static HashAlgo |
getInstance(String nameOrOid) |
static HashAlgo |
getInstanceForEncoded(byte[] encoded) |
static HashAlgo |
getInstanceForEncoded(byte[] encoded,
int offset,
int len) |
String |
getJceName() |
int |
getLength() |
org.bouncycastle.asn1.ASN1ObjectIdentifier |
getOid() |
byte[] |
hash(byte[]... datas) |
byte[] |
hash(byte[] data,
int offset,
int len) |
String |
hexHash(byte[]... datas) |
String |
hexHash(byte[] data,
int offset,
int len) |
boolean |
isShake() |
static HashAlgo |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static HashAlgo[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
int |
write(byte[] out,
int offset) |
public static final HashAlgo SHA1
public static final HashAlgo SHA224
public static final HashAlgo SHA256
public static final HashAlgo SHA384
public static final HashAlgo SHA512
public static final HashAlgo SHA3_224
public static final HashAlgo SHA3_256
public static final HashAlgo SHA3_384
public static final HashAlgo SHA3_512
public static final HashAlgo SM3
public static final HashAlgo SHAKE128
public static final HashAlgo SHAKE256
public static HashAlgo[] values()
for (HashAlgo c : HashAlgo.values()) System.out.println(c);
public static HashAlgo valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic int getLength()
public org.bouncycastle.asn1.ASN1ObjectIdentifier getOid()
public String getJceName()
public boolean isShake()
public static HashAlgo getInstance(org.bouncycastle.asn1.x509.AlgorithmIdentifier id) throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionpublic static HashAlgo getInstance(org.bouncycastle.asn1.ASN1ObjectIdentifier oid) throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionpublic static HashAlgo getInstance(String nameOrOid) throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionpublic static HashAlgo getInstanceForEncoded(byte[] encoded) throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionpublic static HashAlgo getInstanceForEncoded(byte[] encoded, int offset, int len) throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionpublic org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier()
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgIdWithNullParams()
public org.bouncycastle.crypto.ExtendedDigest createDigest()
public String hexHash(byte[]... datas)
public String hexHash(byte[] data, int offset, int len)
public String base64Hash(byte[]... datas)
public String base64Hash(byte[] data, int offset, int len)
public byte[] hash(byte[]... datas)
public byte[] hash(byte[] data,
int offset,
int len)
public int getEncodedLength()
public int write(byte[] out,
int offset)
Copyright © 2023. All rights reserved.