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(java.security.PublicKey pubkey, java.security.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(java.security.PublicKey pubkey,
          java.security.PrivateKey prvkey)
          throws java.lang.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:
java.lang.Exception

update

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

Parameters:
H -
off -
len -
Throws:
java.lang.Exception

verify

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

Parameters:
sig -
Returns:
Throws:
java.lang.Exception

sign

byte[] sign()
            throws java.lang.Exception
Compute the signature

Returns:
Throws:
java.lang.Exception


Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.