src/share/classes/javax/crypto/NullCipherSpi.java

Print this page




  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javax.crypto;
  27 
  28 import java.security.*;
  29 import java.security.spec.*;
  30 
  31 /**
  32  * This class provides a delegate for the identity cipher - one that does not
  33  * tranform the plaintext.
  34  *
  35  * @author  Li Gong
  36  * @see Nullcipher
  37  *
  38  * @since 1.4
  39  */
  40 
  41 final class NullCipherSpi extends CipherSpi {
  42 
  43     /*
  44      * Do not let anybody instantiate this directly (protected).
  45      */
  46     protected NullCipherSpi() {}
  47 
  48     public void engineSetMode(String mode) {}
  49 
  50     public void engineSetPadding(String padding) {}
  51 
  52     protected int engineGetBlockSize() {
  53         return 1;
  54     }
  55 
  56     protected int engineGetOutputSize(int inputLen) {




  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javax.crypto;
  27 
  28 import java.security.*;
  29 import java.security.spec.*;
  30 
  31 /**
  32  * This class provides a delegate for the identity cipher - one that does not
  33  * tranform the plaintext.
  34  *
  35  * @author  Li Gong
  36  * @see NullCipher
  37  *
  38  * @since 1.4
  39  */
  40 
  41 final class NullCipherSpi extends CipherSpi {
  42 
  43     /*
  44      * Do not let anybody instantiate this directly (protected).
  45      */
  46     protected NullCipherSpi() {}
  47 
  48     public void engineSetMode(String mode) {}
  49 
  50     public void engineSetPadding(String padding) {}
  51 
  52     protected int engineGetBlockSize() {
  53         return 1;
  54     }
  55 
  56     protected int engineGetOutputSize(int inputLen) {