Home | History | Annotate | Download | only in crypto

Lines Matching defs:cipher

227      * The cipher must be initialize in either {@code Cipher.DECRYPT_MODE} or
228 * {@code Cipher.UNWRAP_MODE} with the same parameters and key used for
231 * @param cipher
232 * the cipher initialized for decrypting the encrypted data.
235 * if the specified cipher is not suited to decrypt the
238 * if {@code cipher} is {@code null}.
240 public PKCS8EncodedKeySpec getKeySpec(Cipher cipher)
242 if (cipher == null) {
243 throw new NullPointerException("cipher == null");
246 byte[] decryptedData = cipher.doFinal(encryptedData);
270 * if no usable cipher can be found to decrypt the encrypted
284 Cipher cipher = Cipher.getInstance(algName);
286 cipher.init(Cipher.DECRYPT_MODE, decryptKey);
288 cipher.init(Cipher.DECRYPT_MODE, decryptKey, algParameters);
290 byte[] decryptedData = cipher.doFinal(encryptedData);
317 * the name of a provider whose cipher implementation should be
323 * if no usable cipher can be found to decrypt the encrypted
343 Cipher cipher = Cipher.getInstance(algName, providerName);
345 cipher.init(Cipher.DECRYPT_MODE, decryptKey);
347 cipher.init(Cipher.DECRYPT_MODE, decryptKey, algParameters);
349 byte[] decryptedData = cipher.doFinal(encryptedData);
376 * the provider whose cipher implementation should be used.
379 * if no usable cipher can be found to decrypt the encrypted
397 Cipher cipher = Cipher.getInstance(algName, provider);
399 cipher.init(Cipher.DECRYPT_MODE, decryptKey);
401 cipher.init(Cipher.DECRYPT_MODE, decryptKey, algParameters);
403 byte[] decryptedData = cipher.doFinal(encryptedData);