/openjdk7/jdk/src/share/classes/sun/security/krb5/internal/crypto/ |
H A D | NullEType.java | 74 byte[] cipher = new byte[data.length]; 75 System.arraycopy(data, 0, cipher, 0, data.length); 76 return cipher; 80 byte[] cipher = new byte[data.length]; 81 System.arraycopy(data, 0, cipher, 0, data.length); 82 return cipher; 85 public byte[] decrypt(byte[] cipher, byte[] key, int usage) argument 87 return cipher.clone(); 90 public byte[] decrypt(byte[] cipher, byte[] key, byte[] ivec, int usage) argument 92 return cipher [all...] |
H A D | Aes128CtsHmacSha1EType.java | 91 public byte[] decrypt(byte[] cipher, byte[] key, int usage) argument 94 return decrypt(cipher, key, ivec, usage); 97 public byte[] decrypt(byte[] cipher, byte[] key, byte[] ivec, int usage) argument 100 return Aes128.decrypt(key, usage, ivec, cipher, 0, cipher.length);
|
H A D | Aes256CtsHmacSha1EType.java | 91 public byte[] decrypt(byte[] cipher, byte[] key, int usage) argument 94 return decrypt(cipher, key, ivec, usage); 97 public byte[] decrypt(byte[] cipher, byte[] key, byte[] ivec, int usage) argument 100 return Aes256.decrypt(key, usage, ivec, cipher, 0, cipher.length);
|
H A D | ArcFourHmacEType.java | 91 public byte[] decrypt(byte[] cipher, byte[] key, int usage) argument 94 return decrypt(cipher, key, ivec, usage); 97 public byte[] decrypt(byte[] cipher, byte[] key, byte[] ivec, int usage) argument 100 return ArcFourHmac.decrypt(key, usage, ivec, cipher, 0, cipher.length);
|
H A D | Des3CbcHmacSha1KdEType.java | 85 public byte[] decrypt(byte[] cipher, byte[] key, int usage) argument 88 return decrypt(cipher, key, ivec, usage); 91 public byte[] decrypt(byte[] cipher, byte[] key, byte[] ivec, int usage) argument 94 return Des3.decrypt(key, usage, ivec, cipher, 0, cipher.length);
|
/openjdk7/jdk/test/sun/security/pkcs11/Cipher/ |
H A D | ReinitCipher.java | 57 Cipher cipher = Cipher.getInstance("ARCFOUR", p); 58 cipher.init(Cipher.ENCRYPT_MODE, key); 59 cipher.init(Cipher.ENCRYPT_MODE, key); 60 cipher.update(data1); 61 cipher.init(Cipher.ENCRYPT_MODE, key); 62 cipher.update(data1); 63 cipher.doFinal(); 64 cipher.doFinal(); 65 cipher.update(data1); 66 cipher [all...] |
/openjdk7/hotspot/test/compiler/7184394/ |
H A D | TestAESEncode.java | 35 if (!noReinit) cipher.init(Cipher.ENCRYPT_MODE, key, algParams); 38 encode = cipher.doFinal(input, 0, msgSize); 42 encode = new byte[cipher.getOutputSize(msgSize)]; 43 cipher.doFinal(input, 0, msgSize, encode); 54 showCipher(cipher, "Encryption");
|
/openjdk7/jdk/src/share/classes/com/sun/crypto/provider/ |
H A D | FeedbackCipher.java | 32 * This class represents a block cipher in one of its modes. It wraps 45 // the embedded block cipher 48 // the block size of the embedded block cipher 64 * Gets the block size of the embedded cipher. 66 * @return the block size of the embedded cipher 80 * Save the current content of this cipher. 85 * Restores the content of this cipher to the previous saved one. 90 * Initializes the cipher in the specified mode with the given key 99 * initializing this cipher 116 * cipher ca 137 encrypt(byte[] plain, int plainOffset, int plainLen, byte[] cipher, int cipherOffset) argument 154 encryptFinal(byte[] plain, int plainOffset, int plainLen, byte[] cipher, int cipherOffset) argument 176 decrypt(byte[] cipher, int cipherOffset, int cipherLen, byte[] plain, int plainOffset) argument 194 decryptFinal(byte[] cipher, int cipherOffset, int cipherLen, byte[] plain, int plainOffset) argument [all...] |
H A D | SymmetricCipher.java | 32 * intialize the cipher and encrypt/decrypt single blocks. Larger quantities 52 * Retrieves this cipher's block size. 54 * @return the block size of this cipher 59 * Initializes the cipher in the specified mode with the given key. 66 * initializing this cipher 72 * Encrypt one cipher block. 76 * The result is stored in <code>cipher</code>, starting at 81 * @param cipher the buffer for the encryption result 82 * @param cipherOffset the offset in <code>cipher</code> 85 byte[] cipher, in 84 encryptBlock(byte[] plain, int plainOffset, byte[] cipher, int cipherOffset) argument 100 decryptBlock(byte[] cipher, int cipherOffset, byte[] plain, int plainOffset) argument [all...] |
H A D | CipherTextStealing.java | 32 * This class represents ciphers in cipher text stealing (CTS) mode. 39 * <p>This mode is implemented independently of a particular cipher. 48 * just like all other cipher mode implementations. 74 * The result is stored in <code>cipher</code>, starting at 78 * <code>plainLen</code> is a multiple of the embedded cipher's block size, 84 * @param cipher the buffer for the result 85 * @param cipherOffset the offset in <code>cipher</code> 88 byte[] cipher, int cipherOffset) 94 encrypt(plain, plainOffset, plainLen, cipher, cipherOffset); 99 encrypt(plain, plainOffset, plainLen, cipher, cipherOffse 87 encryptFinal(byte[] plain, int plainOffset, int plainLen, byte[] cipher, int cipherOffset) argument 162 decryptFinal(byte[] cipher, int cipherOffset, int cipherLen, byte[] plain, int plainOffset) argument [all...] |
H A D | CipherBlockChaining.java | 31 * This class represents ciphers in cipher block chaining (CBC) mode. 33 * <p>This mode is implemented independently of a particular cipher. 73 * Initializes the cipher in the specified mode with the given key 82 * initializing this cipher 97 * cipher can be reused (with its original iv). 104 * Save the current content of this cipher. 114 * Restores the content of this cipher to the previous saved one. 126 * The result is stored in <code>cipher</code>, starting at 130 * <code>plainLen</code> is a multiple of the embedded cipher's block size, 136 * @param cipher th 139 encrypt(byte[] plain, int plainOffset, int plainLen, byte[] cipher, int cipherOffset) argument 182 decrypt(byte[] cipher, int cipherOffset, int cipherLen, byte[] plain, int plainOffset) argument [all...] |
H A D | CipherFeedback.java | 31 * This class represents ciphers in cipher-feedback (CFB) mode. 33 * <p>This mode is implemented independently of a particular cipher. 56 * of the embedded cipher 83 * Initializes the cipher in the specified mode with the given key 92 * initializing this cipher 101 // always encrypt mode for embedded cipher 108 * cipher can be reused (with its original iv). 115 * Save the current content of this cipher. 125 * Restores the content of this cipher to the previous saved one. 137 * The result is stored in <code>cipher</cod 154 encrypt(byte[] plain, int plainOffset, int plainLen, byte[] cipher, int cipherOffset) argument 222 decrypt(byte[] cipher, int cipherOffset, int cipherLen, byte[] plain, int plainOffset) argument [all...] |
H A D | PCBC.java | 34 * <p>This mode is implemented independently of a particular cipher. 68 * Initializes the cipher in the specified mode with the given key 77 * initializing this cipher 92 * cipher can be reused (with its original iv). 99 * Save the current content of this cipher. 110 * Restores the content of this cipher to the previous saved one. 122 * The result is stored in <code>cipher</code>, starting at 126 * <code>plainLen</code> is a multiple of the embedded cipher's block size, 136 * @param cipher the buffer for the result 137 * @param cipherOffset the offset in <code>cipher</cod 139 encrypt(byte[] plain, int plainOffset, int plainLen, byte[] cipher, int cipherOffset) argument 180 decrypt(byte[] cipher, int cipherOffset, int cipherLen, byte[] plain, int plainOffset) argument [all...] |
H A D | OutputFeedback.java | 33 * <p>This mode is implemented independently of a particular cipher. 55 * of the embedded cipher 82 * Initializes the cipher in the specified mode with the given key 91 * initializing this cipher 100 // always encrypt mode for embedded cipher 107 * cipher can be reused (with its original iv). 114 * Save the current content of this cipher. 124 * Restores the content of this cipher to the previous saved one. 136 * The result is stored in <code>cipher</code>, starting at 150 * @param cipher th 153 encrypt(byte[] plain, int plainOffset, int plainLen, byte[] cipher, int cipherOffset) argument 223 decrypt(byte[] cipher, int cipherOffset, int cipherLen, byte[] plain, int plainOffset) argument [all...] |
/openjdk7/jdk/test/javax/crypto/Cipher/ |
H A D | ByteBuffers.java | 52 Cipher cipher = Cipher.getInstance("DES/ECB/NoPadding"); 53 cipher.init(Cipher.ENCRYPT_MODE, key); 55 byte[] outBytes = cipher.doFinal(t); 77 crypt(cipher, i1, o1, outBytes, random); 78 crypt(cipher, i2, o1, outBytes, random); 79 crypt(cipher, i3, o1, outBytes, random); 80 crypt(cipher, i1, o2, outBytes, random); 81 crypt(cipher, i2, o2, outBytes, random); 82 crypt(cipher, i3, o2, outBytes, random); 87 private static void crypt(Cipher cipher, ByteBuffe argument [all...] |
/openjdk7/jdk/test/javax/crypto/JceSecurity/ |
H A D | SunJCE_BC_LoadOrdering.java | 58 Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding"); 59 cipher.init(Cipher.ENCRYPT_MODE, key); 61 cipher.doFinal("some string".getBytes());
|
/openjdk7/jdk/test/com/sun/crypto/provider/Cipher/CTS/ |
H A D | CTSMode.java | 158 Cipher cipher = Cipher.getInstance(algo+ "/CTS/NoPadding", 162 cipher.init(Cipher.ENCRYPT_MODE, KEY1, IV1); 163 byte[] enc = cipher.doFinal(plainText); 166 System.out.println("cipher: " + toString(cipherText)); 170 cipher.init(Cipher.DECRYPT_MODE, KEY1, IV1); 171 byte[] dec = cipher.doFinal(cipherText); 173 System.out.println("cipher: " + toString(cipherText)); 196 Cipher cipher = 198 int blockSize = cipher.getBlockSize(); 202 cipher [all...] |
/openjdk7/jdk/test/com/sun/crypto/provider/Cipher/PBE/ |
H A D | PKCS12Cipher.java | 44 Cipher cipher = Cipher.getInstance(alg, p); 49 cipher.init(Cipher.ENCRYPT_MODE, key, pbeParams); 50 byte[] enc1 = cipher.doFinal(plaintext); 51 byte[] enc2 = cipher.doFinal(plaintext); 55 pbeParams = cipher.getParameters(); 56 cipher.init(Cipher.DECRYPT_MODE, key, pbeParams); 57 byte[] dec = cipher.doFinal(enc1); 66 cipher.init(Cipher.DECRYPT_MODE, key2, pbeParams); 67 byte[] dec2 = cipher.doFinal(enc1); 72 cipher [all...] |
H A D | DecryptWithoutParameters.java | 43 Cipher cipher = Cipher.getInstance(algo, "SunJCE"); 46 cipher.init(Cipher.DECRYPT_MODE, key);
|
/openjdk7/jdk/test/javax/crypto/CipherSpi/ |
H A D | DirectBBRemaining.java | 42 * process the data internally buffered inBB the cipher when input.remaining() 59 Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding", "SunJCE"); 60 cipher.init(Cipher.ENCRYPT_MODE, key); 77 int outSize = cipher.getOutputSize(size); 80 encrypt(cipher, size, 92 // testing and reset the cipher to a known good state. 93 cipher.init(Cipher.ENCRYPT_MODE, key); 107 private static void encrypt(Cipher cipher, int size, argument 118 byte[] expected = cipher.doFinal(testdata); 152 cipher [all...] |
/openjdk7/jdk/src/share/classes/javax/crypto/ |
H A D | CipherOutputStream.java | 33 * to the underlying OutputStream. The cipher must be fully 36 * <p> For example, if the cipher is initialized for encryption, the 65 // the cipher engine to use to process stream data 66 private Cipher cipher; field in class:CipherOutputStream 81 * <br>Note: if the specified output stream or cipher is 91 cipher = c; 106 cipher = new NullCipher(); 118 obuffer = cipher.update(ibuffer, 0, 1); 155 obuffer = cipher.update(b, off, len); 164 * that have already been processed by the encapsulated cipher objec [all...] |
H A D | CipherInputStream.java | 68 // the cipher engine to use to process stream data 69 private Cipher cipher; field in class:CipherInputStream 75 underlying stream, but have not been processed by the cipher 82 /* the buffer holding data that have been processed by the cipher 107 obuffer = cipher.doFinal(); 120 obuffer = cipher.update(ibuffer, 0, readin); 132 * <br>Note: if the specified input stream or cipher is 141 cipher = c; 155 cipher = new NullCipher(); 299 cipher [all...] |
/openjdk7/jdk/test/sun/security/mscapi/ |
H A D | RSAEncryptDecrypt.java | 47 Cipher cipher = null; 50 cipher = Cipher.getInstance("RSA", "SunMSCAPI"); 57 cipher.init(Cipher.ENCRYPT_MODE, publicKey); 59 byte[] data = cipher.doFinal(PLAINTEXT); 62 cipher.init(Cipher.DECRYPT_MODE, privateKey); 63 data = cipher.doFinal(data);
|
H A D | IsSunMSCAPIAvailable.java | 103 Cipher cipher = null; 106 cipher = Cipher.getInstance("RSA", p); 108 cipher.getClass().getName()); 110 cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", p); 112 cipher.getClass().getName());
|
/openjdk7/jdk/test/com/sun/crypto/provider/Cipher/Blowfish/ |
H A D | BlowfishTestVector.java | 30 * @summary Known Answer Test for Blowfish cipher with ECB mode 74 Cipher cipher = Cipher.getInstance(transformation); 82 cipher.init(Cipher.ENCRYPT_MODE, sKey); 83 byte[] c1 = cipher.doFinal(TV_P1); 87 cipher.init(Cipher.DECRYPT_MODE, sKey); 88 byte[] p1 = cipher.doFinal(c1); 102 cipher.init(Cipher.ENCRYPT_MODE, sKey); 103 byte[] c2 = cipher.doFinal(TV_P2); 107 cipher.init(Cipher.DECRYPT_MODE, sKey); 108 byte[] p2 = cipher [all...] |