JXTA

jxta.security.impl.signature
Class NullSignature

java.lang.Object
  |
  +--jxta.security.impl.signature.NullSignature

public class NullSignature
extends java.lang.Object
implements jxta.security.signature.Signature


Fields inherited from interface jxta.security.signature.Signature
ALG_NULL, ALG_RSA_MD5_PKCS1, ALG_RSA_SHA_PKCS1, MODE_SIGN, MODE_VERIFY, name
 
Constructor Summary
NullSignature()
           
 
Method Summary
 void clearDebug()
          turn off debugging
 byte getAlgorithm()
           
 java.lang.String getAlgorithmName()
           
 void init(byte theMode)
          initialize the Signature object behaviour
 void setDebug()
          turn on debugging
 byte[] sign(byte[] inbuff, int offset, int inLength)
          signs the last buffer of data (may be the only buffer)
 void update(byte[] inbuf, int offset, int length)
          updates data to be signed.
 boolean verify(byte[] inBuff, int inOffset, int inLength, byte[] sigBuff, int sigOffset, int sigLength)
          Verifies a signature for last/only inBuff against the signature in sigBuff.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NullSignature

public NullSignature()
Method Detail

getAlgorithmName

public java.lang.String getAlgorithmName()
Specified by:
getAlgorithmName in interface jxta.security.signature.Signature

getAlgorithm

public byte getAlgorithm()
Specified by:
getAlgorithm in interface jxta.security.signature.Signature

setDebug

public void setDebug()
turn on debugging

clearDebug

public void clearDebug()
turn off debugging

init

public void init(byte theMode)
          throws jxta.security.exceptions.CryptoException
initialize the Signature object behaviour
Specified by:
init in interface jxta.security.signature.Signature

update

public void update(byte[] inbuf,
                   int offset,
                   int length)
            throws jxta.security.exceptions.CryptoException
updates data to be signed.
Specified by:
update in interface jxta.security.signature.Signature

sign

public byte[] sign(byte[] inbuff,
                   int offset,
                   int inLength)
            throws jxta.security.exceptions.CryptoException
signs the last buffer of data (may be the only buffer)
Specified by:
sign in interface jxta.security.signature.Signature

verify

public boolean verify(byte[] inBuff,
                      int inOffset,
                      int inLength,
                      byte[] sigBuff,
                      int sigOffset,
                      int sigLength)
               throws jxta.security.exceptions.CryptoException
Verifies a signature for last/only inBuff against the signature in sigBuff. One can use update as with sign().
Specified by:
verify in interface jxta.security.signature.Signature

JXTA