Uses of Interface java.security.Key

Uses in package java.security

Methods with parameter type java.security.Key

void
KeyStoreSpi.engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain)
Assign the key to the alias in the keystore, protecting it with the given password.
Key
Translates the key from an unknown or untrusted provider into a key for this key factory.
Returns a key specification for the given key. keySpec identifies the specification class to return the key material in.
Returns a key specification for the given key.
void
KeyStore.setKeyEntry(String alias, Key key, char[] password, Certificate[] chain)
Assign the key to the alias in the keystore, protecting it with the given password.
Key
Translates the key from an unknown or untrusted provider into a key from this key factory.

Methods with return type java.security.Key

Key
KeyStoreSpi.engineGetKey(String alias, char[] password)
Returns the key associated with given alias using the supplied password.
Key
Translates the key from an unknown or untrusted provider into a key for this key factory.
Key
KeyStore.getKey(String alias, char[] password)
Returns the key associated with given alias using the supplied password.
Key
Translates the key from an unknown or untrusted provider into a key from this key factory.

Uses in package gnu.javax.crypto.jce.sig

Methods with parameter type java.security.Key

KeySpec
Key
Translates the key from an unknown or untrusted provider into a key for this key factory.

Methods with return type java.security.Key

Key
Translates the key from an unknown or untrusted provider into a key for this key factory.

Uses in package gnu.java.security.jce.sig

Methods with parameter type java.security.Key

KeySpec
KeySpec
KeySpec
Key
Key
Key

Methods with return type java.security.Key

Key
Key
Key

Uses in package gnu.java.security.key.dss

Classes implementing java.security.Key

class
A base asbtract class for both public and private DSS (Digital Signature Standard) keys.
class
An object that embodies a DSS (Digital Signature Standard) private key.
class
An object that embodies a DSS (Digital Signature Standard) public key.

Uses in package gnu.javax.crypto.key.dh

Classes implementing java.security.Key

class
A base asbtract class for both public and private Diffie-Hellman keys.
class
An implementation of the Diffie-Hellman private key.
class
An implementation of the Diffie-Hellman public key.

Uses in package gnu.javax.net.ssl.provider

Methods with parameter type java.security.Key

@Override
@Override

Uses in package gnu.javax.crypto

Methods with parameter type java.security.Key

int
void
RSACipherImpl.engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random)
void
RSACipherImpl.engineInit(int opmode, Key key, SecureRandom random)
void

Uses in package gnu.javax.crypto.jce.mac

Methods with parameter type java.security.Key

void
Initialize (or re-initialize) this instance.
void
Initialize (or re-initialize) this instance.

Uses in package javax.security.auth.kerberos

Classes implementing java.security.Key

class
This class represents a Kerberos key.

Uses in package gnu.javax.crypto.jce

Methods with parameter type java.security.Key

Key
DiffieHellmanImpl.engineDoPhase(Key incoming, boolean lastPhase)
void
void

Methods with return type java.security.Key

Key
DiffieHellmanImpl.engineDoPhase(Key incoming, boolean lastPhase)

Uses in package gnu.javax.crypto.jce.keyring

Methods with parameter type java.security.Key

void
GnuKeyring.engineSetKeyEntry(String alias, Key key, char[] password, Certificate[] chain)

Methods with return type java.security.Key

Key
GnuKeyring.engineGetKey(String alias, char[] password)
Returns the key associated with given alias using the supplied password.

Uses in package gnu.java.security.key.rsa

Classes implementing java.security.Key

class
A base asbtract class for both public and private RSA keys.
class
An object that embodies an RSA private key.
class
An object that encapsulates an RSA public key.

Uses in package gnu.javax.crypto.key

Classes implementing java.security.Key

class
An implementation of a password-based encryption key.
class
A secret key composed of a sequence of raw, unformatted octets.

Uses in package javax.crypto

Methods with parameter type java.security.Key

Key
KeyAgreement.doPhase(Key key, boolean lastPhase)
Do a phase in the key agreement.
Key
KeyAgreementSpi.engineDoPhase(Key key, boolean lastPhase)
Do a phase in the key agreement.
int
Return the length of the given key in bits.

For compatibility this method is not declared abstract, and the default implementation will throw an UnsupportedOperationException.

void
CipherSpi.engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random)
Initializes this cipher with an operation mode, key, parameters, and source of randomness.
void
CipherSpi.engineInit(int opmode, Key key, SecureRandom random)
Initializes this cipher with an operation mode, key, and source of randomness.
void
CipherSpi.engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random)
Initializes this cipher with an operation mode, key, parameters, and source of randomness.
void
Initialize this mechanism with a key.
void
Initialize this mechanism with a key and parameters.
void
Initialize this key agreement with a key and source of randomness.
void
Initialize this mechanism with a key and parameters.
void
Initialize (or re-initialize) this instance.
void
Initialize this key agreement with a key, parameters, and source of randomness.
byte[]
Wrap a key.

For compatibility this method is not declared abstract, and the default implementation will throw an UnsupportedOperationException.

Object
Unseal and deserialize this sealed object with the specified key.
Object
SealedObject.getObject(Key key, String provider)
Unseal and deserialize this sealed object with the specified key, using a cipher from the named provider.
void
Cipher.init(int opmode, Key key)
Initialize this cipher with the supplied key.

The cipher will be initialized for encryption, decryption, key wrapping, or key unwrapping, depending upon whether the opmode argument is ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE, or UNWRAP_MODE, respectively.

If this cipher requires any random bytes (for example for an initilization vector) than the SecureRandom with the highest priority is used as the source of these bytes.

A call to any of the init methods overrides the state of the instance, and is equivalent to creating a new instance and calling its init method.

void
Cipher.init(int opmode, Key key, AlgorithmParameters params)
Initialize this cipher with the supplied key and parameters.

The cipher will be initialized for encryption, decryption, key wrapping, or key unwrapping, depending upon whether the opmode argument is ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE, or UNWRAP_MODE, respectively.

If this cipher requires any random bytes (for example for an initilization vector) then the SecureRandom with the highest priority is used as the source of these bytes.

A call to any of the init methods overrides the state of the instance, and is equivalent to creating a new instance and calling its init method.

void
Cipher.init(int opmode, Key key, AlgorithmParameters params, SecureRandom random)
Initialize this cipher with the supplied key, parameters, and source of randomness.

The cipher will be initialized for encryption, decryption, key wrapping, or key unwrapping, depending upon whether the opmode argument is ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE, or UNWRAP_MODE, respectively.

A call to any of the init methods overrides the state of the instance, and is equivalent to creating a new instance and calling its init method.

void
Cipher.init(int opmode, Key key, SecureRandom random)
Initialize this cipher with the supplied key and source of randomness.

The cipher will be initialized for encryption, decryption, key wrapping, or key unwrapping, depending upon whether the opmode argument is ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE, or UNWRAP_MODE, respectively.

A call to any of the init methods overrides the state of the instance, and is equivalent to creating a new instance and calling its init method.

void
Cipher.init(int opmode, Key key, AlgorithmParameterSpec params)
Initialize this cipher with the supplied key and parameters.

The cipher will be initialized for encryption, decryption, key wrapping, or key unwrapping, depending upon whether the opmode argument is ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE, or UNWRAP_MODE, respectively.

If this cipher requires any random bytes (for example for an initilization vector) then the SecureRandom with the highest priority is used as the source of these bytes.

A call to any of the init methods overrides the state of the instance, and is equivalent to creating a new instance and calling its init method.

void
Cipher.init(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random)
Initialize this cipher with the supplied key, parameters, and source of randomness.

The cipher will be initialized for encryption, decryption, key wrapping, or key unwrapping, depending upon whether the opmode argument is ENCRYPT_MODE, DECRYPT_MODE, WRAP_MODE, or UNWRAP_MODE, respectively.

A call to any of the init methods overrides the state of the instance, and is equivalent to creating a new instance and calling its init method.

void
void
Initialize this key agreement with a key.
void
Mac.init(Key key)
Initialize this MAC with a key and no parameters.
void
void
Initialize this key agreement with a key and a source of randomness.
void
void
Initialize this key agreement with a key and parameters.
void
Initialize this MAC with a key and parameters.
void
Initialize this key agreement with a key, parameters, and source of randomness.
boolean
byte[]
Wrap a key.

Methods with return type java.security.Key

Key
KeyAgreement.doPhase(Key key, boolean lastPhase)
Do a phase in the key agreement.
Key
KeyAgreementSpi.engineDoPhase(Key key, boolean lastPhase)
Do a phase in the key agreement.
Key
CipherSpi.engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType)
Unwraps a previously-wrapped key.

For compatibility this method is not declared abstract, and the default implementation will throw an UnsupportedOperationException.

Key
Cipher.unwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType)
Unwrap a previously-wrapped key.

Uses in package gnu.javax.crypto.jce.cipher

Methods with parameter type java.security.Key

void
AESSpi.engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random)
void
Initializes this cipher with an operation mode, key, parameters, and source of randomness.
void
PBES2.engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random)
void
ARCFourSpi.engineInit(int mode, Key key, SecureRandom r)
Initializes this cipher with an operation mode, key, and source of randomness.
void
PBES2.engineInit(int opmode, Key key, SecureRandom random)
void
AESSpi.engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random)
void
Initializes this cipher with an operation mode, key, parameters, and source of randomness.
void
PBES2.engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random)

Uses in package gnu.javax.crypto.key.srp6

Classes implementing java.security.Key

class
An abstract representation of a base SRP ephemeral key.
class
A representation of an SRP ephemeral private key.
class
A representation of an SRP ephemeral public key.

Uses in package gnu.javax.crypto.keyring

Constructors with parameter type java.security.Key

PrivateKeyEntry.PrivateKeyEntry(Key key, Date creationDate, Properties properties)
Creates a new key entry.

Methods with parameter type java.security.Key

void
GnuPrivateKeyring.putPrivateKey(String alias, Key key, char[] password)
void
IPrivateKeyring.putPrivateKey(String alias, Key key, char[] password)
Adds a private key to this keyring.

Methods with return type java.security.Key

Key
Returns this entry's key.
Key
GnuPrivateKeyring.getPrivateKey(String alias, char[] password)
Key
IPrivateKeyring.getPrivateKey(String alias, char[] password)
Returns the private key with the given alias.

Uses in package gnu.java.security.key

Methods with parameter type java.security.Key

IKeyPairCodec
Returns an instance of a keypair codec given a key.

Uses in package javax.crypto.spec

Classes implementing java.security.Key

class
This is a simple wrapper around a raw byte array, for ciphers that do not require any key parameters other than the bytes themselves.