< prev index next >

jdk/src/jdk.crypto.ucrypto/solaris/classes/com/oracle/security/ucrypto/NativeCipher.java

Print this page




  29 import java.util.Set;
  30 import java.util.Arrays;
  31 import java.util.concurrent.ConcurrentSkipListSet;
  32 import java.lang.ref.*;
  33 
  34 import java.security.*;
  35 import java.security.spec.*;
  36 import javax.crypto.*;
  37 
  38 import javax.crypto.spec.SecretKeySpec;
  39 import javax.crypto.spec.IvParameterSpec;
  40 
  41 /**
  42  * Cipher wrapper class utilizing ucrypto APIs. This class currently supports
  43  * - AES/ECB/NOPADDING
  44  * - AES/CBC/NOPADDING
  45  * - AES/CTR/NOPADDING
  46  * - AES/CFB128/NOPADDING
  47  * (Support for GCM mode is inside the child class NativeGCMCipher)
  48  *
  49  * @since 1.9
  50  */
  51 class NativeCipher extends CipherSpi {
  52 
  53     // public implementation classes
  54     public static final class AesEcbNoPadding extends NativeCipher {
  55         public AesEcbNoPadding() throws NoSuchAlgorithmException {
  56             super(UcryptoMech.CRYPTO_AES_ECB);
  57         }
  58         public AesEcbNoPadding(int keySize) throws NoSuchAlgorithmException {
  59             super(UcryptoMech.CRYPTO_AES_ECB, keySize);
  60         }
  61     }
  62     public static final class AesCbcNoPadding extends NativeCipher {
  63         public AesCbcNoPadding() throws NoSuchAlgorithmException {
  64             super(UcryptoMech.CRYPTO_AES_CBC);
  65         }
  66         public AesCbcNoPadding(int keySize) throws NoSuchAlgorithmException {
  67             super(UcryptoMech.CRYPTO_AES_CBC, keySize);
  68         }
  69     }




  29 import java.util.Set;
  30 import java.util.Arrays;
  31 import java.util.concurrent.ConcurrentSkipListSet;
  32 import java.lang.ref.*;
  33 
  34 import java.security.*;
  35 import java.security.spec.*;
  36 import javax.crypto.*;
  37 
  38 import javax.crypto.spec.SecretKeySpec;
  39 import javax.crypto.spec.IvParameterSpec;
  40 
  41 /**
  42  * Cipher wrapper class utilizing ucrypto APIs. This class currently supports
  43  * - AES/ECB/NOPADDING
  44  * - AES/CBC/NOPADDING
  45  * - AES/CTR/NOPADDING
  46  * - AES/CFB128/NOPADDING
  47  * (Support for GCM mode is inside the child class NativeGCMCipher)
  48  *
  49  * @since 9
  50  */
  51 class NativeCipher extends CipherSpi {
  52 
  53     // public implementation classes
  54     public static final class AesEcbNoPadding extends NativeCipher {
  55         public AesEcbNoPadding() throws NoSuchAlgorithmException {
  56             super(UcryptoMech.CRYPTO_AES_ECB);
  57         }
  58         public AesEcbNoPadding(int keySize) throws NoSuchAlgorithmException {
  59             super(UcryptoMech.CRYPTO_AES_ECB, keySize);
  60         }
  61     }
  62     public static final class AesCbcNoPadding extends NativeCipher {
  63         public AesCbcNoPadding() throws NoSuchAlgorithmException {
  64             super(UcryptoMech.CRYPTO_AES_CBC);
  65         }
  66         public AesCbcNoPadding(int keySize) throws NoSuchAlgorithmException {
  67             super(UcryptoMech.CRYPTO_AES_CBC, keySize);
  68         }
  69     }


< prev index next >