Android Guides | Samples

Javax.Crypto.Spec Namespace

This package provides the classes and interfaces needed to specify keys and parameter for encryption.

Remarks

This package provides the classes and interfaces needed to specify keys and parameter for encryption. The following standards are supported:

  • PKCS#3 Diffie-Hellman Key Agreement standard;
  • FIPS-46-2 Data Encryption Standard (DES);
  • PKCS#5 Password-Based Cryptography standard.

Keys may be specified via algorithm or in a more abstract and general way with ASN.1.

Keys and algorithm parameters are specified for the following procedures:

  • DH
  • DES
  • TripleDES
  • PBE
  • RC2
  • RC5

Classes

TypeReason
DESedeKeySpecThe key specification for a triple-DES (DES-EDE) key.
DESKeySpecThe key specification for a DES key.
DHGenParameterSpecThe algorithm parameter specification for generating Diffie-Hellman parameters used in Diffie-Hellman key agreement.
DHParameterSpecThe algorithm parameter specification for the Diffie-Hellman algorithm.
DHPrivateKeySpecThe key specification for a Diffie-Hellman private key.
DHPublicKeySpecThe key specification for a Diffie-Hellman public key.
GCMParameterSpecProvides a the parameters for an instance of a Cipher using Galois/Counter Mode (GCM).
IvParameterSpecThe algorithm parameter specification for an initialization vector.
OAEPParameterSpecThe algorithm parameter specification for the OAEP Padding algorithm.
PBEKeySpecThe key specification for a password based encryption key.
PBEParameterSpecThe algorithm parameter specification for a password based encryption algorithm.
PSourceThe source of the label L as specified in .
PSource+PSpecifiedThe explicit specification of the parameter P used in the source algorithm.
RC2ParameterSpecThe algorithm parameter specification for the algorithm.
RC5ParameterSpecThe algorithm parameter specification for the algorithm.
SecretKeySpecA key specification for a SecretKey and also a secret key implementation that is provider-independent.
SecretKeySpec+InterfaceConsts