Methods Summary |
---|
public final java.lang.String | getAlgorithm()Returns the name of the algorithm.
return algorithm;
|
public final byte[] | getEncoded()Returns this {@code AlgorithmParameters} in their default encoding
format. The default encoding format is ASN.1.
if (!initialized) {
throw new IOException(Messages.getString("security.1F")); //$NON-NLS-1$
}
return spiImpl.engineGetEncoded();
|
public final byte[] | getEncoded(java.lang.String format)Returns this {@code AlgorithmParameters} in the specified encoding
format.
if (!initialized) {
throw new IOException(Messages.getString("security.1F")); //$NON-NLS-1$
}
return spiImpl.engineGetEncoded(format);
|
public static java.security.AlgorithmParameters | getInstance(java.lang.String algorithm)Returns a new instance of {@code AlgorithmParameters} for the specified
algorithm.
if (algorithm == null) {
throw new NullPointerException(Messages.getString("security.01")); //$NON-NLS-1$
}
synchronized (engine) {
engine.getInstance(algorithm, null);
return new AlgorithmParameters((AlgorithmParametersSpi) engine.spi,
engine.provider, algorithm);
}
|
public static java.security.AlgorithmParameters | getInstance(java.lang.String algorithm, java.lang.String provider)Returns a new instance of {@code AlgorithmParameters} from the specified
provider for the specified algorithm.
if ((provider == null) || (provider.length() == 0)) {
throw new IllegalArgumentException(Messages.getString("security.02")); //$NON-NLS-1$
}
Provider p = Security.getProvider(provider);
if (p == null) {
throw new NoSuchProviderException(Messages.getString("security.03", //$NON-NLS-1$
provider));
}
return getInstance(algorithm, p);
|
public static java.security.AlgorithmParameters | getInstance(java.lang.String algorithm, java.security.Provider provider)Returns a new instance of {@code AlgorithmParameters} from the specified
provider for the specified algorithm.
if (provider == null) {
throw new IllegalArgumentException(Messages.getString("security.04")); //$NON-NLS-1$
}
if (algorithm == null) {
throw new NullPointerException(Messages.getString("security.01")); //$NON-NLS-1$
}
synchronized (engine) {
engine.getInstance(algorithm, provider, null);
return new AlgorithmParameters((AlgorithmParametersSpi) engine.spi,
provider, algorithm);
}
|
public final T | getParameterSpec(java.lang.Class paramSpec)Returns the {@code AlgorithmParameterSpec} for this {@code
AlgorithmParameters}.
if (!initialized) {
throw new InvalidParameterSpecException(
Messages.getString("security.1F")); //$NON-NLS-1$
}
return spiImpl.engineGetParameterSpec(paramSpec);
|
public final java.security.Provider | getProvider()Returns the provider associated with this {@code AlgorithmParameters}.
return provider;
|
public final void | init(java.security.spec.AlgorithmParameterSpec paramSpec)Initializes this {@code AlgorithmParameters} with the specified {@code
AlgorithmParameterSpec}.
if (initialized) {
throw new InvalidParameterSpecException(
Messages.getString("security.1E")); //$NON-NLS-1$
}
spiImpl.engineInit(paramSpec);
initialized = true;
|
public final void | init(byte[] params)Initializes this {@code AlgorithmParameters} with the specified {@code
byte[]} using the default decoding format for parameters. The default
encoding format is ASN.1.
if (initialized) {
throw new IOException(Messages.getString("security.1E")); //$NON-NLS-1$
}
spiImpl.engineInit(params);
initialized = true;
|
public final void | init(byte[] params, java.lang.String format)Initializes this {@code AlgorithmParameters} with the specified {@code
byte[]} using the specified decoding format.
if (initialized) {
throw new IOException(Messages.getString("security.1E")); //$NON-NLS-1$
}
spiImpl.engineInit(params, format);
initialized = true;
|
public final java.lang.String | toString()Returns a string containing a concise, human-readable description of this
{@code AlgorithmParameters}.
if (!initialized) {
return null;
}
return spiImpl.engineToString();
|