Uses of Class
java.security.InvalidKeyException
Packages that use InvalidKeyException
Package
Description
Provides the classes and interfaces for the security framework.
Provides classes and interfaces for parsing and managing
 certificates, certificate revocation lists (CRLs), and
 certification paths.
Provides the classes and interfaces for cryptographic
 operations.
Provides classes and interfaces for key specifications and
 algorithm parameter specifications.
Provides classes for public key certificates.
- 
Uses of InvalidKeyException in java.securityMethods in java.security that throw InvalidKeyExceptionModifier and TypeMethodDescriptionprotected abstract voidSignatureSpi.engineInitSign(PrivateKey privateKey)Initializes this signature object with the specified private key for signing operations.protected voidSignatureSpi.engineInitSign(PrivateKey privateKey, SecureRandom random)Initializes this signature object with the specified private key and source of randomness for signing operations.protected abstract voidSignatureSpi.engineInitVerify(PublicKey publicKey)Initializes this signature object with the specified public key for verification operations.protected abstract KeyKeyFactorySpi.engineTranslateKey(Key key)Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.voidSignature.initSign(PrivateKey privateKey)Initialize this object for signing.voidSignature.initSign(PrivateKey privateKey, SecureRandom random)Initialize this object for signing.voidSignature.initVerify(Certificate certificate)Initializes this object for verification, using the public key from the given certificate.voidSignature.initVerify(PublicKey publicKey)Initializes this object for verification.KeyFactory.translateKey(Key key)Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this key factory.booleanVerifies that the signature in this SignedObject is the valid signature for the object stored inside, with the given verification key, using the designated verification engine.Constructors in java.security that throw InvalidKeyExceptionModifierConstructorDescriptionSignedObject(Serializable object, PrivateKey signingKey, Signature signingEngine)Constructs a SignedObject from any Serializable object.
- 
Uses of InvalidKeyException in java.security.certMethods in java.security.cert that throw InvalidKeyExceptionModifier and TypeMethodDescriptionabstract voidVerifies that this certificate was signed using the private key that corresponds to the specified public key.abstract voidVerifies that this certificate was signed using the private key that corresponds to the specified public key.voidVerifies that this certificate was signed using the private key that corresponds to the specified public key.voidVerifies that this certificate was signed using the private key that corresponds to the specified public key.abstract voidVerifies that this CRL was signed using the private key that corresponds to the given public key.abstract voidVerifies that this CRL was signed using the private key that corresponds to the given public key.voidVerifies that this CRL was signed using the private key that corresponds to the given public key.
- 
Uses of InvalidKeyException in javax.cryptoMethods in javax.crypto that throw InvalidKeyExceptionModifier and TypeMethodDescriptionExecutes the next phase of this key agreement with the given key that was received from one of the other parties involved in this key agreement.protected abstract KeyKeyAgreementSpi.engineDoPhase(Key key, boolean lastPhase)Executes the next phase of this key agreement with the given key that was received from one of the other parties involved in this key agreement.protected abstract SecretKeyKeyAgreementSpi.engineGenerateSecret(String algorithm)Creates the shared secret and returns it as a secret key object of the requested algorithm type.protected intCipherSpi.engineGetKeySize(Key key)Returns the key size of the given key object in bits.protected abstract voidCipherSpi.engineInit(int opmode, Key key, AlgorithmParameters params, SecureRandom random)Initializes this cipher with a key, a set of algorithm parameters, and a source of randomness.protected abstract voidCipherSpi.engineInit(int opmode, Key key, SecureRandom random)Initializes this cipher with a key and a source of randomness.protected abstract voidCipherSpi.engineInit(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random)Initializes this cipher with a key, a set of algorithm parameters, and a source of randomness.protected abstract voidExemptionMechanismSpi.engineInit(Key key)Initializes this exemption mechanism with a key.protected abstract voidExemptionMechanismSpi.engineInit(Key key, AlgorithmParameters params)Initializes this exemption mechanism with a key and a set of algorithm parameters.protected abstract voidExemptionMechanismSpi.engineInit(Key key, AlgorithmParameterSpec params)Initializes this exemption mechanism with a key and a set of algorithm parameters.protected abstract voidKeyAgreementSpi.engineInit(Key key, SecureRandom random)Initializes this key agreement with the given key and source of randomness.protected abstract voidKeyAgreementSpi.engineInit(Key key, AlgorithmParameterSpec params, SecureRandom random)Initializes this key agreement with the given key, set of algorithm parameters, and source of randomness.protected abstract voidMacSpi.engineInit(Key key, AlgorithmParameterSpec params)Initializes the MAC with the given (secret) key and algorithm parameters.protected abstract SecretKeySecretKeyFactorySpi.engineTranslateKey(SecretKey key)Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this secret-key factory.protected KeyCipherSpi.engineUnwrap(byte[] wrappedKey, String wrappedKeyAlgorithm, int wrappedKeyType)Unwrap a previously wrapped key.protected byte[]CipherSpi.engineWrap(Key key)Wrap a key.KeyAgreement.generateSecret(String algorithm)Creates the shared secret and returns it as aSecretKeyobject of the specified algorithm.EncryptedPrivateKeyInfo.getKeySpec(Key decryptKey)Extract the enclosed PKCS8EncodedKeySpec object from the encrypted data and return it.EncryptedPrivateKeyInfo.getKeySpec(Key decryptKey, String providerName)Extract the enclosed PKCS8EncodedKeySpec object from the encrypted data and return it.EncryptedPrivateKeyInfo.getKeySpec(Key decryptKey, Provider provider)Extract the enclosed PKCS8EncodedKeySpec object from the encrypted data and return it.Retrieves the original (encapsulated) object.Retrieves the original (encapsulated) object.voidCipher.init(int opmode, Certificate certificate)Initializes this cipher with the public key from the given certificate.voidCipher.init(int opmode, Certificate certificate, SecureRandom random)Initializes this cipher with the public key from the given certificate and a source of randomness.voidInitializes this cipher with a key.voidCipher.init(int opmode, Key key, AlgorithmParameters params)Initializes this cipher with a key and a set of algorithm parameters.voidCipher.init(int opmode, Key key, AlgorithmParameters params, SecureRandom random)Initializes this cipher with a key, a set of algorithm parameters, and a source of randomness.voidCipher.init(int opmode, Key key, SecureRandom random)Initializes this cipher with a key and a source of randomness.voidCipher.init(int opmode, Key key, AlgorithmParameterSpec params)Initializes this cipher with a key and a set of algorithm parameters.voidCipher.init(int opmode, Key key, AlgorithmParameterSpec params, SecureRandom random)Initializes this cipher with a key, a set of algorithm parameters, and a source of randomness.voidInitializes this exemption mechanism with a key.voidExemptionMechanism.init(Key key, AlgorithmParameters params)Initializes this exemption mechanism with a key and a set of algorithm parameters.voidExemptionMechanism.init(Key key, AlgorithmParameterSpec params)Initializes this exemption mechanism with a key and a set of algorithm parameters.voidInitializes this key agreement with the given key, which is required to contain all the algorithm parameters required for this key agreement.voidKeyAgreement.init(Key key, SecureRandom random)Initializes this key agreement with the given key and source of randomness.voidKeyAgreement.init(Key key, AlgorithmParameterSpec params)Initializes this key agreement with the given key and set of algorithm parameters.voidKeyAgreement.init(Key key, AlgorithmParameterSpec params, SecureRandom random)Initializes this key agreement with the given key, set of algorithm parameters, and source of randomness.voidInitializes thisMacobject with the given key.voidMac.init(Key key, AlgorithmParameterSpec params)Initializes thisMacobject with the given key and algorithm parameters.SecretKeyFactory.translateKey(SecretKey key)Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this secret-key factory.Unwrap a previously wrapped key.byte[]Wrap a key.
- 
Uses of InvalidKeyException in javax.crypto.specMethods in javax.crypto.spec that throw InvalidKeyExceptionModifier and TypeMethodDescriptionstatic booleanDESedeKeySpec.isParityAdjusted(byte[] key, int offset)Checks if the given DES-EDE key, starting atoffsetinclusive, is parity-adjusted.static booleanDESKeySpec.isParityAdjusted(byte[] key, int offset)Checks if the given DES key material, starting atoffsetinclusive, is parity-adjusted.static booleanDESKeySpec.isWeak(byte[] key, int offset)Checks if the given DES key material is weak or semi-weak.Constructors in javax.crypto.spec that throw InvalidKeyExceptionModifierConstructorDescriptionDESedeKeySpec(byte[] key)Creates a DESedeKeySpec object using the first 24 bytes inkeyas the key material for the DES-EDE key.DESedeKeySpec(byte[] key, int offset)Creates a DESedeKeySpec object using the first 24 bytes inkey, beginning atoffsetinclusive, as the key material for the DES-EDE key.DESKeySpec(byte[] key)Creates a DESKeySpec object using the first 8 bytes inkeyas the key material for the DES key.DESKeySpec(byte[] key, int offset)Creates a DESKeySpec object using the first 8 bytes inkey, beginning atoffsetinclusive, as the key material for the DES key.
- 
Uses of InvalidKeyException in javax.security.certMethods in javax.security.cert that throw InvalidKeyExceptionModifier and TypeMethodDescriptionabstract voidDeprecated, for removal: This API element is subject to removal in a future version.Verifies that this certificate was signed using the private key that corresponds to the specified public key.abstract voidDeprecated, for removal: This API element is subject to removal in a future version.Verifies that this certificate was signed using the private key that corresponds to the specified public key.