Lines Matching refs:key

163      * Initializes this cipher with a key and a source
166 * encryption, decryption, key wrapping or key unwrapping, depending on
176 * @param key the encryption key
179 * @exception InvalidKeyException if the given key is inappropriate for
182 protected void engineInit(int opmode, Key key, SecureRandom random)
185 engineInit(opmode, key, (AlgorithmParameterSpec) null, random);
195 * Initializes this cipher with a key, a set of
198 * encryption, decryption, key wrapping or key unwrapping, depending on
208 * @param key the encryption key
212 * @exception InvalidKeyException if the given key is inappropriate for
217 protected void engineInit(int opmode, Key key,
221 core.init(opmode, key, params, random);
224 protected void engineInit(int opmode, Key key,
228 core.init(opmode, key, params, random);
364 * Returns the key size of the given key object.
366 * @param key the key object.
368 * @return the key size of the given key object.
370 * @exception InvalidKeyException if <code>key</code> is invalid.
372 protected int engineGetKeySize(Key key) throws InvalidKeyException {
373 // Always returns 56 since the encryption key
374 // is a DES key.
379 * Wrap a key.
381 * @param key the key to be wrapped.
383 * @return the wrapped key.
387 * encoding of the key to be wrapped is not a
391 * wrap the key with this cipher (e.g., a hardware protected key is
394 protected byte[] engineWrap(Key key)
396 return core.wrap(key);
400 * Unwrap a previously wrapped key.
402 * @param wrappedKey the key to be unwrapped.
404 * @param wrappedKeyAlgorithm the algorithm the wrapped key is for.
406 * @param wrappedKeyType the type of the wrapped key.
410 * @return the unwrapped key.
417 * represent a wrapped key of type <code>wrappedKeyType</code> for