1 7 8 15 16 package javax.crypto; 17 18 import java.util.*; 19 import java.util.regex.*; 20 import java.security.*; 21 import javax.crypto.spec.*; 22 import sun.security.jca.*; 23 24 import java.security.Provider.Service; 25 import java.security.spec.AlgorithmParameterSpec; 26 import java.security.spec.InvalidParameterSpecException; 27 import java.security.cert.Certificate; 28 import java.security.cert.X509Certificate; 29 import java.nio.ByteBuffer; 30 import java.nio.ReadOnlyBufferException; 31 import sun.security.util.Debug; 32 import sun.security.jca.GetInstance.Instance; 33 34 82 public class Cipher 83 { 84 87 public static final int ENCRYPT_MODE = 1; 88 89 92 public static final int DECRYPT_MODE = 2; 93 94 97 public static final int WRAP_MODE = 3; 98 99 102 public static final int UNWRAP_MODE = 4; 103 104 107 public static final int PUBLIC_KEY = 1; 108 109 112 public static final int PRIVATE_KEY = 2; 113 114 117 public static final int SECRET_KEY = 3; 118 119 126 protected Cipher(CipherSpi cipherSpi, Provider provider, String 127 transformation) 128 { } 129 130 155 public static final Cipher getInstance(String transformation) 156 throws NoSuchAlgorithmException, NoSuchPaddingException 157 { } 158 159 183 public static final Cipher getInstance(String transformation, String 184 provider) 185 throws NoSuchAlgorithmException, NoSuchProviderException, 186 NoSuchPaddingException 187 { } 188 189 212 public static final Cipher getInstance(String transformation, Provider 213 provider) throws NoSuchAlgorithmException, NoSuchPaddingException 214 { } 215 216 221 public final Provider getProvider() { } 222 223 232 public final String getAlgorithm() { } 233 234 240 public final int getBlockSize() { } 241 242 262 public final int getOutputSize(int inputLen) { } 263 264 275 public final byte[] getIV() { } 276 277 288 public final AlgorithmParameters getParameters() { } 289 290 296 public final ExemptionMechanism getExemptionMechanism() { } 297 298 342 public final void init(int opmode, Key key) throws InvalidKeyException { } 343 344 385 public final void init(int opmode, Key key, SecureRandom random) 386 throws InvalidKeyException 387 { } 388 389 439 public final void init(int opmode, Key key, AlgorithmParameterSpec params) 440 throws InvalidKeyException, InvalidAlgorithmParameterException 441 { } 442 443 490 public final void init(int opmode, Key key, AlgorithmParameterSpec params, 491 SecureRandom random) 492 throws InvalidKeyException, InvalidAlgorithmParameterException 493 { } 494 495 545 public final void init(int opmode, Key key, AlgorithmParameters params) 546 throws InvalidKeyException, InvalidAlgorithmParameterException 547 { } 548 549 596 public final void init(int opmode, Key key, AlgorithmParameters params, 597 SecureRandom random) 598 throws InvalidKeyException, InvalidAlgorithmParameterException 599 { } 600 601 657 public final void init(int opmode, Certificate certificate) 658 throws InvalidKeyException 659 { } 660 661 717 public final void init(int opmode, Certificate certificate, SecureRandom 718 random) throws InvalidKeyException 719 { } 720 721 741 public final byte[] update(byte[] input) { } 742 743 767 public final byte[] update(byte[] input, int inputOffset, int inputLen) { } 768 769 805 public final int update(byte[] input, int inputOffset, int inputLen, byte[] 806 output) throws ShortBufferException 807 { } 808 809 848 public final int update(byte[] input, int inputOffset, int inputLen, byte[] 849 output, int outputOffset) throws ShortBufferException 850 { } 851 852 890 public final int update(ByteBuffer input, ByteBuffer output) 891 throws ShortBufferException 892 { } 893 894 925 public final byte[] doFinal() 926 throws IllegalBlockSizeException, BadPaddingException 927 { } 928 929 973 public final int doFinal(byte[] output, int outputOffset) 974 throws IllegalBlockSizeException, ShortBufferException, 975 BadPaddingException 976 { } 977 978 1012 public final byte[] doFinal(byte[] input) 1013 throws IllegalBlockSizeException, BadPaddingException 1014 { } 1015 1016 1054 public final byte[] doFinal(byte[] input, int inputOffset, int inputLen) 1055 throws IllegalBlockSizeException, BadPaddingException 1056 { } 1057 1058 1110 public final int doFinal(byte[] input, int inputOffset, int inputLen, byte[] 1111 output) 1112 throws ShortBufferException, IllegalBlockSizeException, 1113 BadPaddingException 1114 { } 1115 1116 1172 public final int doFinal(byte[] input, int inputOffset, int inputLen, byte[] 1173 output, int outputOffset) 1174 throws ShortBufferException, IllegalBlockSizeException, 1175 BadPaddingException 1176 { } 1177 1178 1233 public final int doFinal(ByteBuffer input, ByteBuffer output) 1234 throws ShortBufferException, IllegalBlockSizeException, 1235 BadPaddingException 1236 { } 1237 1238 1257 public final byte[] wrap(Key key) 1258 throws IllegalBlockSizeException, InvalidKeyException 1259 { } 1260 1261 1286 public final Key unwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int 1287 wrappedKeyType) throws InvalidKeyException, NoSuchAlgorithmException 1288 { } 1289 1290 1308 public static final int getMaxAllowedKeyLength(String transformation) 1309 throws NoSuchAlgorithmException 1310 { } 1311 1312 1330 public static final AlgorithmParameterSpec getMaxAllowedParameterSpec(String 1331 transformation) throws NoSuchAlgorithmException 1332 { } 1333} 1334 | Popular Tags |