Lines Matching refs:key

41  * <p> Blowfish is a 64-bit block cipher with a variable-length key.
160 * Initializes this cipher with a key and a source of randomness.
163 * encryption, decryption, key wrapping or key unwrapping, depending on
168 * This behaviour should only be used in encryption or key wrapping
171 * key unwrapping, the IV
172 * (same IV that was used for encryption or key wrapping) must be provided
183 * @param key the secret key
186 * @exception InvalidKeyException if the given key is inappropriate for
189 protected void engineInit(int opmode, Key key, SecureRandom random)
191 core.init(opmode, key, random);
195 * Initializes this cipher with a key, a set of
199 * encryption, decryption, key wrapping or key unwrapping, depending on
209 * @param key the encryption key
213 * @exception InvalidKeyException if the given key is inappropriate for
218 protected void engineInit(int opmode, Key key,
222 core.init(opmode, key, params, random);
225 protected void engineInit(int opmode, Key key,
229 core.init(opmode, key, params, random);
367 * Returns the key size of the given key object.
369 * @param key the key object.
371 * @return the key size of the given key object.
373 * @exception InvalidKeyException if <code>key</code> is invalid.
375 protected int engineGetKeySize(Key key) throws InvalidKeyException {
376 return (key.getEncoded().length * 8);
380 * Wrap a key.
382 * @param key the key to be wrapped.
384 * @return the wrapped key.
388 * encoding of the key to be wrapped is not a
392 * wrap the key with this cipher (e.g., a hardware protected key is
395 protected byte[] engineWrap(Key key)
397 return core.wrap(key);
401 * Unwrap a previously wrapped key.
403 * @param wrappedKey the key to be unwrapped.
405 * @param wrappedKeyAlgorithm the algorithm the wrapped key is for.
407 * @param wrappedKeyType the type of the wrapped key.
411 * @return the unwrapped key.
418 * represent a wrapped key of type <code>wrappedKeyType</code> for