public class Digest
extends java.lang.Object
Representation#getDigest()
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ALGORITHM_HTTP_DIGEST
Digest algorithm for the HTTP DIGEST scheme.
|
static java.lang.String |
ALGORITHM_MD2
Digest algorithm defined in RFC 1319.
|
static java.lang.String |
ALGORITHM_MD5
Digest algorithm defined in RFC 1321.
|
static java.lang.String |
ALGORITHM_NONE
No digest algorithm defined.
|
static java.lang.String |
ALGORITHM_SHA_1
Digest algorithm defined in Secure Hash Standard, NIST FIPS 180-1.
|
static java.lang.String |
ALGORITHM_SHA_256
NIST approved digest algorithm from SHA-2 family.
|
static java.lang.String |
ALGORITHM_SHA_384
NIST approved digest algorithm from SHA-2 family.
|
static java.lang.String |
ALGORITHM_SHA_512
NIST approved digest algorithm from SHA-2 family.
|
Constructor and Description |
---|
Digest(byte[] value)
Constructor using the MD5 algorithm by default.
|
Digest(java.lang.String algorithm,
byte[] value)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAlgorithm()
Returns the digest algorithm.
|
byte[] |
getValue()
Returns the digest value.
|
int |
hashCode() |
java.lang.String |
toString() |
public static final java.lang.String ALGORITHM_MD2
public static final java.lang.String ALGORITHM_MD5
public static final java.lang.String ALGORITHM_NONE
public static final java.lang.String ALGORITHM_SHA_1
public static final java.lang.String ALGORITHM_SHA_256
public static final java.lang.String ALGORITHM_SHA_384
public static final java.lang.String ALGORITHM_SHA_512
public static final java.lang.String ALGORITHM_HTTP_DIGEST
public Digest(byte[] value)
value
- The digest value.public Digest(java.lang.String algorithm, byte[] value)
algorithm
- The digest algorithm.value
- The digest value.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String getAlgorithm()
public byte[] getValue()
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2005-2024 Restlet.