The ISignatureCodec
interface defines methods for externalizing
and de-externalizing native signature results, as would be returned by
the ISignature.sign()
method, or passed to
ISignature.verify()
method. The only format currently supported
is the “RAW” codec, which is specific to GNU Crypto.
Each signature scheme implements its own raw codec. There is no factory for codecs, but rather you should create instances of
gnu.crypto.sig.dss.DSSSignatureRawCodec
if you are reading or
writing DSS signatures, or
gnu.crypto.sig.rsa.RSAPSSSignatureRawCodec
if you are reading
or writing RSA-PSS signatures.
Each of these classes has a zero-argument constructor, needs no initialization, and defines these methods:
Decodes a signature from the byte represention encoded, and returns the signature in the signature algorithm's native form. Implementations may throw an unchecked exception (such as
java.lang.IlligalArgumentException
) if the argument is improperly formatted.