Name

NullMAC

Synopsis

This class implements a MAC that doesn’t calculate anything. Instances of this MAC are returned by the JxtaCryptoSuite class when the class has been instantiated without specifying a MAC type.

public class NullMAC implements jxta.security.mac.MAC {
// Public Constructors
   public NullMAC();  
// Methods Implementing MAC
   public int encrypt(byte[ ] inbuff, int offset, int inLength, byte[ ] macBuff, int macOffset) 
       throws jxta.security.exceptions.CryptoException
   public byte getAlgorithm();                                  
// constant default:0
   public String getAlgorithmName();                            
// default:"NullMAC”
   public int getLength();                                      
// constant default:0
   public void init(byte theMode, jxta.security.cipher.Key theKey, byte[ ] privateKey) 
       throws jxta.security.exceptions.CryptoException;
   public void update(byte[ ] inbuf, int offset, int length) throws jxta.security.exceptions.CryptoException; 
   public boolean verify(byte[ ] inBuff, int inOffset, int inLength, byte[ ] macBuff, int macOffset, int macLength) 
       throws jxta.security.exceptions.CryptoException; 
// Methods Implementing Description
   public void clearDebug();  
   public void setDebug();  
}

Get JXTA in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.