Name
AlgorithmParameters
Synopsis
This class is a generic, opaque
representation of the parameters used by some cryptographic
algorithm. You can create an instance of the class with one of the
static getInstance( )
factory methods, specifying
the desired algorithm and, optionally, the desired provider. The
default “SUN” provider supports the
“DSA” algorithm. The
“SunJCE” provider shipped with the
JCE supports “DES”,
“DESede”,
“PBE”,
“Blowfish”, and
“DiffieHellman”. Once you have
obtained an AlgorithmParameters
object, initialize
it by passing an algorithm-specific
java.security.spec.AlgorithmParameterSpec
object
or the encoded parameter values as a byte array to the init(
)
method. You can also create an
AlgorithmParameters
object with an
AlgorithmParameterGenerator
.
getEncoded( )
returns
the initialized algorithm parameters as a byte array, using either
the algorithm-specific default encoding or the named encoding format
you specified.
public class AlgorithmParameters { // Protected Constructors protected AlgorithmParameters(AlgorithmParametersSpi paramSpi, Provider provider, String algorithm); // Public Class Methods public static AlgorithmParameters getInstance(String algorithm) throws NoSuchAlgorithmException; public static AlgorithmParameters getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException; 1.4 public static AlgorithmParameters getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException; // Public ...
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.