|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Signature
Signature interface for SSH used to sign or verify data. Usually wraps a javax.crypto.Signature object.
| Method Summary | |
|---|---|
void |
init(PublicKey pubkey,
PrivateKey prvkey)
Initialize this signature with the given public key and private key. |
byte[] |
sign()
Compute the signature. |
void |
update(byte[] H)
Convenience method, same as calling update(byte[], int, int) with offset as 0 and H.length. |
void |
update(byte[] H,
int off,
int len)
Update the computed signature with the given data. |
boolean |
verify(byte[] sig)
Verify against the given signature. |
| Method Detail |
|---|
void init(PublicKey pubkey,
PrivateKey prvkey)
pubkey - (null-ok) specify in case verification is neededprvkey - (null-ok) specify in case signing is neededvoid update(byte[] H)
update(byte[], int, int) with offset as 0 and H.length.
H - the byte-array to update with
void update(byte[] H,
int off,
int len)
H - byte-array to update withoff - offset within the arraylen - length until which to computebyte[] sign()
boolean verify(byte[] sig)
sig - the signature to verify against
true on successful verification, false on failure
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||