- What is secretkeyfactory in java
- Methods inherited from class java.lang.Object
- Constructor Detail
- SecretKeyFactory
- Method Detail
- getInstance
- getInstance
- getInstance
- getProvider
- getAlgorithm
- generateSecret
- getKeySpec
- translateKey
- What is secretkeyfactory in java
- Methods inherited from class java.lang.Object
- Constructor Detail
- SecretKeyFactory
- Method Detail
- getInstance
- getInstance
- getInstance
- getProvider
- getAlgorithm
- generateSecret
- getKeySpec
- translateKey
- What is secretkeyfactory in java
- Methods inherited from class java.lang.Object
- Constructor Detail
- SecretKeyFactory
- Method Detail
- getInstance
- getInstance
- getInstance
- getProvider
- getAlgorithm
- generateSecret
- getKeySpec
- translateKey
- Class SecretKeyFactory
- Constructor Summary
- Method Summary
- Methods declared in class java.lang.Object
- Constructor Details
- SecretKeyFactory
- Method Details
- getInstance
- getInstance
- getInstance
- getProvider
- getAlgorithm
- generateSecret
- getKeySpec
- translateKey
What is secretkeyfactory in java
Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this secret-key factory.
Methods inherited from class java.lang.Object
Constructor Detail
SecretKeyFactory
protected SecretKeyFactory(SecretKeyFactorySpi keyFacSpi, Provider provider, String algorithm)
Method Detail
getInstance
public static final SecretKeyFactory getInstance(String algorithm) throws NoSuchAlgorithmException
Returns a SecretKeyFactory object that converts secret keys of the specified algorithm. This method traverses the list of registered security Providers, starting with the most preferred Provider. A new SecretKeyFactory object encapsulating the SecretKeyFactorySpi implementation from the first Provider that supports the specified algorithm is returned. Note that the list of registered providers may be retrieved via the Security.getProviders() method.
getInstance
public static final SecretKeyFactory getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException
Returns a SecretKeyFactory object that converts secret keys of the specified algorithm. A new SecretKeyFactory object encapsulating the SecretKeyFactorySpi implementation from the specified provider is returned. The specified provider must be registered in the security provider list. Note that the list of registered providers may be retrieved via the Security.getProviders() method.
getInstance
public static final SecretKeyFactory getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException
Returns a SecretKeyFactory object that converts secret keys of the specified algorithm. A new SecretKeyFactory object encapsulating the SecretKeyFactorySpi implementation from the specified Provider object is returned. Note that the specified Provider object does not have to be registered in the provider list.
getProvider
getAlgorithm
Returns the algorithm name of this SecretKeyFactory object. This is the same name that was specified in one of the getInstance calls that created this SecretKeyFactory object.
generateSecret
public final SecretKey generateSecret(KeySpec keySpec) throws InvalidKeySpecException
getKeySpec
public final KeySpec getKeySpec(SecretKey key, Class keySpec) throws InvalidKeySpecException
translateKey
public final SecretKey translateKey(SecretKey key) throws InvalidKeyException
Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this secret-key factory.
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2020, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
What is secretkeyfactory in java
Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this secret-key factory.
Methods inherited from class java.lang.Object
Constructor Detail
SecretKeyFactory
protected SecretKeyFactory(SecretKeyFactorySpi keyFacSpi, Provider provider, String algorithm)
Method Detail
getInstance
public static final SecretKeyFactory getInstance(String algorithm) throws NoSuchAlgorithmException
Returns a SecretKeyFactory object that converts secret keys of the specified algorithm. This method traverses the list of registered security Providers, starting with the most preferred Provider. A new SecretKeyFactory object encapsulating the SecretKeyFactorySpi implementation from the first Provider that supports the specified algorithm is returned. Note that the list of registered providers may be retrieved via the Security.getProviders() method.
getInstance
public static final SecretKeyFactory getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException
Returns a SecretKeyFactory object that converts secret keys of the specified algorithm. A new SecretKeyFactory object encapsulating the SecretKeyFactorySpi implementation from the specified provider is returned. The specified provider must be registered in the security provider list. Note that the list of registered providers may be retrieved via the Security.getProviders() method.
getInstance
public static final SecretKeyFactory getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException
Returns a SecretKeyFactory object that converts secret keys of the specified algorithm. A new SecretKeyFactory object encapsulating the SecretKeyFactorySpi implementation from the specified Provider object is returned. Note that the specified Provider object does not have to be registered in the provider list.
getProvider
getAlgorithm
Returns the algorithm name of this SecretKeyFactory object. This is the same name that was specified in one of the getInstance calls that created this SecretKeyFactory object.
generateSecret
public final SecretKey generateSecret(KeySpec keySpec) throws InvalidKeySpecException
getKeySpec
public final KeySpec getKeySpec(SecretKey key, Class keySpec) throws InvalidKeySpecException
translateKey
public final SecretKey translateKey(SecretKey key) throws InvalidKeyException
Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this secret-key factory.
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2023, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
What is secretkeyfactory in java
Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this secret-key factory.
Methods inherited from class java.lang.Object
Constructor Detail
SecretKeyFactory
protected SecretKeyFactory(SecretKeyFactorySpi keyFacSpi, Provider provider, String algorithm)
Method Detail
getInstance
public static final SecretKeyFactory getInstance(String algorithm) throws NoSuchAlgorithmException
Returns a SecretKeyFactory object that converts secret keys of the specified algorithm. This method traverses the list of registered security Providers, starting with the most preferred Provider. A new SecretKeyFactory object encapsulating the SecretKeyFactorySpi implementation from the first Provider that supports the specified algorithm is returned. Note that the list of registered providers may be retrieved via the Security.getProviders() method.
getInstance
public static final SecretKeyFactory getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException
Returns a SecretKeyFactory object that converts secret keys of the specified algorithm. A new SecretKeyFactory object encapsulating the SecretKeyFactorySpi implementation from the specified provider is returned. The specified provider must be registered in the security provider list. Note that the list of registered providers may be retrieved via the Security.getProviders() method.
getInstance
public static final SecretKeyFactory getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException
Returns a SecretKeyFactory object that converts secret keys of the specified algorithm. A new SecretKeyFactory object encapsulating the SecretKeyFactorySpi implementation from the specified Provider object is returned. Note that the specified Provider object does not have to be registered in the provider list.
getProvider
getAlgorithm
Returns the algorithm name of this SecretKeyFactory object. This is the same name that was specified in one of the getInstance calls that created this SecretKeyFactory object.
generateSecret
public final SecretKey generateSecret(KeySpec keySpec) throws InvalidKeySpecException
getKeySpec
public final KeySpec getKeySpec(SecretKey key, Class keySpec) throws InvalidKeySpecException
translateKey
public final SecretKey translateKey(SecretKey key) throws InvalidKeyException
Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this secret-key factory.
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2023, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.
Class SecretKeyFactory
Key factories are used to convert keys (opaque cryptographic keys of type Key ) into key specifications (transparent representations of the underlying key material), and vice versa. Secret key factories operate only on secret (symmetric) keys.
Key factories are bidirectional, i.e., they allow to build an opaque key object from a given key specification (key material), or to retrieve the underlying key material of a key object in a suitable format.
Application developers should refer to their provider’s documentation to find out which key specifications are supported by the generateSecret and getKeySpec methods. For example, the DESede (Triple DES) secret-key factory supplied by the «SunJCE» provider supports DESedeKeySpec as a transparent representation of Triple DES keys.
Constructor Summary
Method Summary
Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this secret-key factory.
Methods declared in class java.lang.Object
Constructor Details
SecretKeyFactory
Method Details
getInstance
Returns a SecretKeyFactory object that converts secret keys of the specified algorithm. This method traverses the list of registered security providers, starting with the most preferred provider. A new SecretKeyFactory object encapsulating the SecretKeyFactorySpi implementation from the first provider that supports the specified algorithm is returned. Note that the list of registered providers may be retrieved via the Security.getProviders() method.
getInstance
Returns a SecretKeyFactory object that converts secret keys of the specified algorithm. A new SecretKeyFactory object encapsulating the SecretKeyFactorySpi implementation from the specified provider is returned. The specified provider must be registered in the security provider list. Note that the list of registered providers may be retrieved via the Security.getProviders() method.
getInstance
public static final SecretKeyFactory getInstance (String algorithm, Provider provider) throws NoSuchAlgorithmException
Returns a SecretKeyFactory object that converts secret keys of the specified algorithm. A new SecretKeyFactory object encapsulating the SecretKeyFactorySpi implementation from the specified provider object is returned. Note that the specified provider object does not have to be registered in the provider list.
getProvider
getAlgorithm
Returns the algorithm name of this SecretKeyFactory object. This is the same name that was specified in one of the getInstance calls that created this SecretKeyFactory object.
generateSecret
getKeySpec
translateKey
Translates a key object, whose provider may be unknown or potentially untrusted, into a corresponding key object of this secret-key factory.
Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2023, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.