org.apache.sshd.common.signature
Class AbstractSignature

java.lang.Object
  extended by org.apache.sshd.common.signature.AbstractSignature
All Implemented Interfaces:
Signature
Direct Known Subclasses:
SignatureDSA, SignatureRSA

public abstract class AbstractSignature
extends Object
implements Signature

TODO Add javadoc

Author:
Apache MINA SSHD Project

Field Summary
protected  String algorithm
           
protected  Signature signature
           
 
Constructor Summary
protected AbstractSignature(String algorithm)
           
 
Method Summary
protected  byte[] extractSig(byte[] sig)
           
 void init(PublicKey pubkey, PrivateKey prvkey)
          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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.sshd.common.Signature
sign, verify
 

Field Detail

signature

protected Signature signature

algorithm

protected String algorithm
Constructor Detail

AbstractSignature

protected AbstractSignature(String algorithm)
Method Detail

init

public void init(PublicKey pubkey,
                 PrivateKey prvkey)
          throws Exception
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
Throws:
Exception

update

public void update(byte[] foo,
                   int off,
                   int len)
            throws Exception
Description copied from interface: Signature
Update the computed signature with the given data

Specified by:
update in interface Signature
Throws:
Exception

extractSig

protected byte[] extractSig(byte[] sig)


Copyright © 2008-2012 Apache Software Foundation. All Rights Reserved.