Name

CipherSpi

Synopsis

This abstract class defines the service-provider interface for Cipher. A cryptographic provider must implement a concrete subclass of this class for each encryption algorithm it supports. A provider can implement a separate class for each combination of algorithm, mode, and padding scheme it supports or implement more general classes and leave the mode and/or padding scheme to be specified in calls to engineSetMode( ) and engineSetPadding( ). Applications never need to use or subclass this class.

public abstract class CipherSpi {
// Public Constructors
     public CipherSpi( );  
// Protected Instance Methods
                  5.0  protected int engineDoFinal(java.nio.ByteBuffer input, java.nio.ByteBuffer output) 
        throws ShortBufferException, IllegalBlockSizeException, BadPaddingException;  
     protected abstract byte[ ] engineDoFinal(byte[ ] input, int inputOffset, int inputLen) 
        throws IllegalBlockSizeException, BadPaddingException;  
     protected abstract int engineDoFinal(byte[ ] input, int inputOffset, int inputLen, 
        byte[ ] output, int outputOffset) 
        throws ShortBufferException, IllegalBlockSizeException, BadPaddingException;  
     protected abstract int engineGetBlockSize( );  
     protected abstract byte[ ] engineGetIV( );  
     protected int engineGetKeySize(java.security.Key key) 
        throws java.security.InvalidKeyException;  
     protected abstract int engineGetOutputSize(int inputLen);  
     protected abstract java.security.AlgorithmParameters engineGetParameters( );  
     protected abstract void engineInit(int opmode, java.security.Key ...

Get Java in a Nutshell, 5th Edition 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.