public abstract class

AbstractSignature

extends Object
implements Signature
java.lang.Object
   ↳ net.schmizz.sshj.signature.AbstractSignature
Known Direct Subclasses

Class Overview

An abstract class for Signature that implements common functionality.

Summary

Fields
protected final String algorithm
protected Signature signature
Protected Constructors
AbstractSignature(String algorithm)
Public Methods
void init(PublicKey publicKey, PrivateKey privateKey)
Initialize this signature with the given public key and private key.
void update(byte[] foo, int off, int len)
Update the computed signature with the given data.
void update(byte[] foo)
Convenience method, same as calling update(byte[], int, int) with offset as 0 and H.length.
Protected Methods
byte[] extractSig(byte[] sig)
[Expand]
Inherited Methods
From class java.lang.Object
From interface net.schmizz.sshj.signature.Signature

Fields

protected final String algorithm

protected Signature signature

Protected Constructors

protected AbstractSignature (String algorithm)

Parameters
algorithm

Public Methods

public void init (PublicKey publicKey, PrivateKey privateKey)

Initialize this signature with the given public key and private key. If the private key is null, only signature verification can be performed.

Parameters
publicKey (null-ok) specify in case verification is needed
privateKey (null-ok) specify in case signing is needed

public void update (byte[] foo, int off, int len)

Update the computed signature with the given data.

Parameters
foo Byte-array to update with
off Offset within the array
len Length until which to compute

public void update (byte[] foo)

Convenience method, same as calling update(byte[], int, int) with offset as 0 and H.length.

Parameters
foo The byte-array to update with

Protected Methods

protected byte[] extractSig (byte[] sig)

Parameters
sig