Exemplo n.º 1
0
 Key implUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType)
     throws InvalidKeyException, NoSuchAlgorithmException {
   return cipher.unwrap(wrappedKey, wrappedKeyAlgorithm, wrappedKeyType);
 }
Exemplo n.º 2
0
 /**
  * Unwrap a previously wrapped key.
  *
  * @param wrappedKey the key to be unwrapped.
  * @param wrappedKeyAlgorithm the algorithm the wrapped key is for.
  * @param wrappedKeyType the type of the wrapped key. This is one of <code>Cipher.SECRET_KEY
  *     </code>, <code>Cipher.PRIVATE_KEY</code>, or <code>Cipher.PUBLIC_KEY</code>.
  * @return the unwrapped key.
  * @exception NoSuchAlgorithmException if no installed providers can create keys of type <code>
  *     wrappedKeyType</code> for the <code>wrappedKeyAlgorithm</code>.
  * @exception InvalidKeyException if <code>wrappedKey</code> does not represent a wrapped key of
  *     type <code>wrappedKeyType</code> for the <code>wrappedKeyAlgorithm</code>.
  */
 protected Key engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType)
     throws InvalidKeyException, NoSuchAlgorithmException {
   return core.unwrap(wrappedKey, wrappedKeyAlgorithm, wrappedKeyType);
 }