public abstract class AbstractAWSSigner extends Object implements Signer
Not intended to be sub-classed by developers.
| Modifier and Type | Field and Description |
|---|---|
static String |
EMPTY_STRING_SHA256_HEX |
| Constructor and Description |
|---|
AbstractAWSSigner() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
hash(byte[] data)
Hashes the binary data using the SHA-256 algorithm.
|
byte[] |
hash(String text)
Hashes the string contents (assumed to be UTF-8) using the SHA-256
algorithm.
|
byte[] |
sign(String stringData,
byte[] key,
SigningAlgorithm algorithm) |
byte[] |
signWithMac(String stringData,
Mac mac) |
public static final String EMPTY_STRING_SHA256_HEX
public byte[] sign(String stringData, byte[] key, SigningAlgorithm algorithm) throws SdkClientException
SdkClientExceptionpublic byte[] hash(String text) throws SdkClientException
text - The string to hash.SdkClientException - If the hash cannot be computed.public byte[] hash(byte[] data)
throws SdkClientException
data - The binary data to hash.SdkClientException - If the hash cannot be computed.