IT. Expert System.

Android Reference

SecretKeyFactory


javax.crypto

Class SecretKeyFactory

    • Constructor Detail

      • SecretKeyFactory

        protected SecretKeyFactory(SecretKeyFactorySpi keyFacSpi,
                        Provider provider,
                        String algorithm)
        Creates a new SecretKeyFactory
        Parameters:
        keyFacSpi - the SPI delegate.
        provider - the provider providing this key factory.
        algorithm - the algorithm name for the secret key.
    • Method Detail

      • getAlgorithm

        public final String getAlgorithm()
        Returns the name of the secret key algorithm.
        Returns:
        the name of the secret key algorithm.
      • getProvider

        public final Provider getProvider()
        Returns the provider for this SecretKeyFactory instance.
        Returns:
        the provider for this SecretKeyFactory instance.
      • getInstance

        public static final SecretKeyFactory getInstance(String algorithm)
                                                  throws NoSuchAlgorithmException
        Creates a new SecretKeyFactory instance for the specified key algorithm.
        Parameters:
        algorithm - the name of the key algorithm.
        Returns:
        a secret key factory for the specified key algorithm.
        Throws:
        NoSuchAlgorithmException - if no installed provider can provide the requested algorithm.
        NullPointerException - if the specified algorithm is null.
      • getInstance

        public static final SecretKeyFactory getInstance(String algorithm,
                                   Provider provider)
                                                  throws NoSuchAlgorithmException
        Creates a new SecretKeyFactory instance for the specified key algorithm from the specified provider.
        Parameters:
        algorithm - the name of the key algorithm.
        provider - the provider that provides the requested algorithm.
        Returns:
        a secret key factory for the specified key algorithm from the specified provider.
        Throws:
        NoSuchAlgorithmException - if the specified provider cannot provider the requested algorithm.
        IllegalArgumentException - if the specified provider is null.
        NullPointerException - is the specified algorithm name is null.
      • generateSecret

        public final SecretKey generateSecret(KeySpec keySpec)
                                       throws InvalidKeySpecException
        Generate a secret key from the specified key specification.
        Parameters:
        keySpec - the key specification.
        Returns:
        a secret key.
        Throws:
        InvalidKeySpecException - if the specified key specification cannot be used to generate a secret key.
      • getKeySpec

        public final KeySpec getKeySpec(SecretKey key,
                         Class keySpec)
                                 throws InvalidKeySpecException
        Returns the key specification of the specified secret key.
        Parameters:
        key - the secret key to get the specification from.
        keySpec - the target key specification class.
        Returns:
        an instance of the specified key specification class.
        Throws:
        InvalidKeySpecException - if the specified secret key cannot be transformed into the requested key specification.
      • translateKey

        public final SecretKey translateKey(SecretKey key)
                                     throws InvalidKeyException
        Translates the specified secret key into an instance of the corresponding key from the provider of this key factory.
        Parameters:
        key - the secret key to translate.
        Returns:
        the corresponding translated key.
        Throws:
        InvalidKeyException - if the specified key cannot be translated using this key factory.


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 21 / 158778657. Delta: 0.03162 с