public interface Signer
Modifier and Type | Method and Description |
---|---|
byte[] |
generate()
Generate a signature for the accumulated data.
|
byte[] |
generate(byte[] input)
Generate a signature for the accumulated data, including the provided buffer.
|
byte[] |
generate(byte[] input,
int inputOffset,
int inputLen)
Generate a signature for the accumulated data, including the part of the provided buffer.
|
String |
getAlgorithmName() |
byte[] |
getEncoded() |
FilterInputStream |
getInputStream(InputStream is)
Return a pass through input stream, all data will be accumulated for calculating signatures.
|
OutputStream |
getOutputStream()
Return a pass through output stream, all data will be accumulated for calculating signatures.
|
boolean |
isForSigning() |
void |
update(byte input)
Accumulate byte data to calculate signature.
|
void |
update(byte[] input)
Accumulate byte array data to calculate signature.
|
void |
update(byte[] input,
int inputOffset,
int inputLen)
Accumulate part of a byte array to calculate signature.
|
boolean |
verify(byte[] signature)
Verify the given signature against the accumulated data.
|
boolean |
verify(byte[] signature,
byte[] input)
Verify the given signature against the accumulated data, including the provided buffer.
|
boolean |
verify(byte[] signature,
int signOffset,
int signLen,
byte[] input,
int inputOffset,
int inputLen)
Verify the given signature against the accumulated data, including the part of the provided buffer.
|
String getAlgorithmName()
boolean isForSigning()
FilterInputStream getInputStream(InputStream is)
is
- an input stream to read from and pass through.OutputStream getOutputStream()
void update(byte input)
input
- a byte.void update(byte[] input)
input
- a byte array.void update(byte[] input, int inputOffset, int inputLen)
input
- the input buffer.inputOffset
- the offset in input where the input starts.inputLen
- the input length.byte[] generate() throws GeneralSecurityException
GeneralSecurityException
- if this signing algorithm is unable to proceed properly.byte[] generate(byte[] input) throws GeneralSecurityException
input
- the input buffer.GeneralSecurityException
- if this signing algorithm is unable to proceed properly.byte[] generate(byte[] input, int inputOffset, int inputLen) throws GeneralSecurityException
input
- the input buffer.inputOffset
- the offset in input where the input starts.inputLen
- the input length.GeneralSecurityException
- if this signing algorithm is unable to proceed properly.boolean verify(byte[] signature) throws GeneralSecurityException
signature
- to be verified.GeneralSecurityException
- if this signing algorithm is unable to proceed properly.boolean verify(byte[] signature, byte[] input) throws GeneralSecurityException
signature
- to be verified.input
- the input buffer.GeneralSecurityException
- if this signing algorithm is unable to proceed properly.boolean verify(byte[] signature, int signOffset, int signLen, byte[] input, int inputOffset, int inputLen) throws GeneralSecurityException
signature
- to be verified.signOffset
- the offset in signature buffer where the signature starts.signLen
- the signature length.input
- the input buffer.inputOffset
- the offset in input where the input starts.inputLen
- the input length.GeneralSecurityException
- if this signing algorithm is unable to proceed properly.byte[] getEncoded()
Copyright © 2004–2022 XWiki. All rights reserved.