KeyPairGeneratorSpi.Initialize Method

Definition

Overloads

Initialize(IAlgorithmParameterSpec, SecureRandom)

Initializes the key pair generator using the specified parameter set and user-provided source of randomness.

Initialize(Int32, SecureRandom)

Initializes the key pair generator for a certain keysize, using the default parameter set.

Initialize(IAlgorithmParameterSpec, SecureRandom)

Initializes the key pair generator using the specified parameter set and user-provided source of randomness.

[Android.Runtime.Register("initialize", "(Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V", "GetInitialize_Ljava_security_spec_AlgorithmParameterSpec_Ljava_security_SecureRandom_Handler")]
public virtual void Initialize (Java.Security.Spec.IAlgorithmParameterSpec? params, Java.Security.SecureRandom? random);
[<Android.Runtime.Register("initialize", "(Ljava/security/spec/AlgorithmParameterSpec;Ljava/security/SecureRandom;)V", "GetInitialize_Ljava_security_spec_AlgorithmParameterSpec_Ljava_security_SecureRandom_Handler")>]
abstract member Initialize : Java.Security.Spec.IAlgorithmParameterSpec * Java.Security.SecureRandom -> unit
override this.Initialize : Java.Security.Spec.IAlgorithmParameterSpec * Java.Security.SecureRandom -> unit

Parameters

params
IAlgorithmParameterSpec

the parameter set used to generate the keys.

random
SecureRandom

the source of randomness for this generator.

Attributes

Exceptions

if the specified parameters are not supported.

Remarks

Initializes the key pair generator using the specified parameter set and user-provided source of randomness.

This concrete method has been added to this previously-defined abstract class. (For backwards compatibility, it cannot be abstract.) It may be overridden by a provider to initialize the key pair generator. Such an override is expected to throw an InvalidAlgorithmParameterException if a parameter is inappropriate for this key pair generator. If this method is not overridden, it always throws an UnsupportedOperationException.

Added in 1.2.

Java documentation for java.security.KeyPairGeneratorSpi.initialize(java.security.spec.AlgorithmParameterSpec, java.security.SecureRandom).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Initialize(Int32, SecureRandom)

Initializes the key pair generator for a certain keysize, using the default parameter set.

[Android.Runtime.Register("initialize", "(ILjava/security/SecureRandom;)V", "GetInitialize_ILjava_security_SecureRandom_Handler")]
public abstract void Initialize (int keysize, Java.Security.SecureRandom? random);
[<Android.Runtime.Register("initialize", "(ILjava/security/SecureRandom;)V", "GetInitialize_ILjava_security_SecureRandom_Handler")>]
abstract member Initialize : int * Java.Security.SecureRandom -> unit

Parameters

keysize
Int32

the keysize. This is an algorithm-specific metric, such as modulus length, specified in number of bits.

random
SecureRandom

the source of randomness for this generator.

Attributes

Remarks

Initializes the key pair generator for a certain keysize, using the default parameter set.

Java documentation for java.security.KeyPairGeneratorSpi.initialize(int, java.security.SecureRandom).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to