org.apache.sshd.common
Interface Signature

All Known Implementing Classes:
AbstractSignature, SignatureDSA, SignatureRSA

public interface Signature

Signature interface for SSH used to sign or verify packets Usually wraps a javax.crypto.Signature object

Author:
Apache MINA SSHD Project

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, int off, int len)
          Update the computed signature with the given data
 boolean verify(byte[] sig)
          Verify against the given signature
 

Method Detail

init

void init(PublicKey pubkey,
          PrivateKey prvkey)
          throws Exception
Initialize this signature with the given public key and private key. If the private key is null, only signature verification can be performed.

Parameters:
pubkey -
prvkey -
Throws:
Exception

update

void update(byte[] H,
            int off,
            int len)
            throws Exception
Update the computed signature with the given data

Parameters:
H -
off -
len -
Throws:
Exception

verify

boolean verify(byte[] sig)
               throws Exception
Verify against the given signature

Parameters:
sig -
Returns:
Throws:
Exception

sign

byte[] sign()
            throws Exception
Compute the signature

Returns:
Throws:
Exception


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