public enum HashAlgo extends Enum<HashAlgo>
| Enum Constant and Description |
|---|
SHA1 |
SHA224 |
SHA256 |
SHA3_224 |
SHA3_256 |
SHA3_384 |
SHA3_512 |
SHA384 |
SHA512 |
SM3 |
| Modifier and Type | Method and Description |
|---|---|
String |
base64Hash(byte[]... datas) |
String |
base64Hash(byte[] data,
int offset,
int len) |
org.bouncycastle.crypto.Digest |
createDigest() |
AlgorithmCode |
getAlgorithmCode() |
org.bouncycastle.asn1.x509.AlgorithmIdentifier |
getAlgorithmIdentifier() |
int |
getEncodedLength() |
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) |
int |
getLength() |
String |
getName() |
static HashAlgo |
getNonNullInstance(org.bouncycastle.asn1.ASN1ObjectIdentifier oid) |
static HashAlgo |
getNonNullInstance(String nameOrOid) |
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) |
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 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 AlgorithmCode getAlgorithmCode()
public org.bouncycastle.asn1.ASN1ObjectIdentifier getOid()
public String getName()
public static HashAlgo getInstance(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)
public static HashAlgo getNonNullInstance(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)
public static HashAlgo getInstanceForEncoded(byte[] encoded)
public static HashAlgo getInstanceForEncoded(byte[] encoded, int offset, int len)
public org.bouncycastle.asn1.x509.AlgorithmIdentifier getAlgorithmIdentifier()
public org.bouncycastle.crypto.Digest 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 © 2020. All rights reserved.