public class XmdMessageExpansion extends java.lang.Object implements MessageExpansion
| Constructor and Description |
|---|
XmdMessageExpansion(Digest digest,
int k,
int s)
Constructs an XmdMessageExpansion instance capable of performing cryptographic message expansion
using the specified digest algorithm, security parameter, and custom input block size parameter.
|
XmdMessageExpansion(ExtendedDigest digest,
int k)
Constructs an XmdMessageExpansion instance with the given digest algorithm and security
parameter.
|
| Modifier and Type | Method and Description |
|---|---|
byte[] |
expandMessage(byte[] msg,
byte[] dst,
int lenInBytes)
Expands a given input message to a fixed-length output, using a cryptographic digest and
additional parameters such as domain separation tag (DST) and desired output length.
|
public XmdMessageExpansion(Digest digest, int k, int s)
digest - the cryptographic digest algorithm to be usedk - the security parameter defining the required minimum security strength, in bitss - the input block size parameter for the cryptographic digest algorithmjava.lang.IllegalArgumentException - if the hash output size is too small for the specified security
levelpublic XmdMessageExpansion(ExtendedDigest digest, int k)
digest - the cryptographic digest algorithm to be usedk - the security parameter defining the required minimum security strengthpublic byte[] expandMessage(byte[] msg,
byte[] dst,
int lenInBytes)
expandMessage in interface MessageExpansionmsg - the input message to be expandeddst - the domain separation tag used to isolate cryptographic domainslenInBytes - the desired byte-length of the output messagejava.lang.IllegalArgumentException - if ell exceeds 255, lenInBytes exceeds 65535, or dst length is
greater than 255