Interface Signatory
-
- All Known Implementing Classes:
PgpSignatory
,SignatorySupport
public interface Signatory
A signatory is an object capable of providing a signature for an arbitrary stream of bytes.- Since:
- 4.5
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getKeyId()
Returns the id of the key that will be used for signing.java.lang.String
getName()
An identifying name for this signatory.byte[]
sign(java.io.InputStream toSign)
ExhauststoSign
, and returns the raw signature bytes.void
sign(java.io.InputStream toSign, java.io.OutputStream destination)
ExhauststoSign
, and writes the signature tosignatureDestination
.
-
-
-
Method Detail
-
getName
@Internal java.lang.String getName()
An identifying name for this signatory.
The name must be constant for the life of the signatory and should uniquely identify it within a project.
-
sign
void sign(java.io.InputStream toSign, java.io.OutputStream destination)
ExhauststoSign
, and writes the signature tosignatureDestination
. The caller is responsible for closing the streams, though the output WILL be flushed.- Parameters:
toSign
- The source of the data to be signeddestination
- Where the signature will be written to
-
sign
byte[] sign(java.io.InputStream toSign)
ExhauststoSign
, and returns the raw signature bytes.- Parameters:
toSign
- The source of the data to be signed- Returns:
- The raw bytes of the signature
-
-