net.schmizz.sshj.signature
Class AbstractSignature
java.lang.Object
net.schmizz.sshj.signature.AbstractSignature
- All Implemented Interfaces:
- Signature
- Direct Known Subclasses:
- SignatureDSA, SignatureRSA
public abstract class AbstractSignature
- extends Object
- implements Signature
An abstract class for Signature
that implements common functionality.
Method Summary |
protected byte[] |
extractSig(byte[] sig)
|
void |
init(PublicKey publicKey,
PrivateKey privateKey)
Initialize this signature with the given public key and private key. |
void |
update(byte[] foo)
Convenience method, same as calling Signature.update(byte[], int, int) with offset as 0 and H.length . |
void |
update(byte[] foo,
int off,
int len)
Update the computed signature with the given data. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
algorithm
protected final String algorithm
signature
protected Signature signature
AbstractSignature
protected AbstractSignature(String algorithm)
init
public void init(PublicKey publicKey,
PrivateKey privateKey)
- Description copied from interface:
Signature
- Initialize this signature with the given public key and private key. If the private key is null, only signature
verification can be performed.
- Specified by:
init
in interface Signature
- Parameters:
publicKey
- (null-ok) specify in case verification is neededprivateKey
- (null-ok) specify in case signing is needed
update
public void update(byte[] foo)
- Description copied from interface:
Signature
- Convenience method, same as calling
Signature.update(byte[], int, int)
with offset as 0
and H.length
.
- Specified by:
update
in interface Signature
- Parameters:
foo
- the byte-array to update with
update
public void update(byte[] foo,
int off,
int len)
- Description copied from interface:
Signature
- Update the computed signature with the given data.
- Specified by:
update
in interface Signature
- Parameters:
foo
- byte-array to update withoff
- offset within the arraylen
- length until which to compute
extractSig
protected byte[] extractSig(byte[] sig)
Copyright © 2009-2012. All Rights Reserved.