Partager via


IDSAKeyPairGenerator.Initialize Method

Definition

Overloads

Initialize(IDSAParams, SecureRandom)

Initializes the key pair generator using the DSA family parameters (p,q and g) and an optional SecureRandom bit source.

Initialize(Int32, Boolean, SecureRandom)

Initializes the key pair generator for a given modulus length (instead of parameters), and an optional SecureRandom bit source.

Initialize(IDSAParams, SecureRandom)

Initializes the key pair generator using the DSA family parameters (p,q and g) and an optional SecureRandom bit source.

[Android.Runtime.Register("initialize", "(Ljava/security/interfaces/DSAParams;Ljava/security/SecureRandom;)V", "GetInitialize_Ljava_security_interfaces_DSAParams_Ljava_security_SecureRandom_Handler:Java.Security.Interfaces.IDSAKeyPairGeneratorInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void Initialize (Java.Security.Interfaces.IDSAParams? params, Java.Security.SecureRandom? random);
[<Android.Runtime.Register("initialize", "(Ljava/security/interfaces/DSAParams;Ljava/security/SecureRandom;)V", "GetInitialize_Ljava_security_interfaces_DSAParams_Ljava_security_SecureRandom_Handler:Java.Security.Interfaces.IDSAKeyPairGeneratorInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Initialize : Java.Security.Interfaces.IDSAParams * Java.Security.SecureRandom -> unit

Parameters

params
IDSAParams

the parameters to use to generate the keys.

random
SecureRandom

the random bit source to use to generate key bits; can be null.

Attributes

Exceptions

if the specified parameter values are null or invalid.

Remarks

Initializes the key pair generator using the DSA family parameters (p,q and g) and an optional SecureRandom bit source. If a SecureRandom bit source is needed but not supplied, i.e. null, a default SecureRandom instance will be used.

Java documentation for java.security.interfaces.DSAKeyPairGenerator.initialize(java.security.interfaces.DSAParams, 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, Boolean, SecureRandom)

Initializes the key pair generator for a given modulus length (instead of parameters), and an optional SecureRandom bit source.

[Android.Runtime.Register("initialize", "(IZLjava/security/SecureRandom;)V", "GetInitialize_IZLjava_security_SecureRandom_Handler:Java.Security.Interfaces.IDSAKeyPairGeneratorInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void Initialize (int modlen, bool genParams, Java.Security.SecureRandom? random);
[<Android.Runtime.Register("initialize", "(IZLjava/security/SecureRandom;)V", "GetInitialize_IZLjava_security_SecureRandom_Handler:Java.Security.Interfaces.IDSAKeyPairGeneratorInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Initialize : int * bool * Java.Security.SecureRandom -> unit

Parameters

modlen
Int32

the modulus length in bits. Valid values are any multiple of 64 between 512 and 1024, inclusive, 2048, and 3072.

genParams
Boolean

whether or not to generate new parameters for the modulus length requested.

random
SecureRandom

the random bit source to use to generate key bits; can be null.

Attributes

Exceptions

if the specified modulus length is not valid, or if there are no pre-calculated values and genParams is false.

Remarks

Initializes the key pair generator for a given modulus length (instead of parameters), and an optional SecureRandom bit source. If a SecureRandom bit source is needed but not supplied, i.e. null, a default SecureRandom instance will be used.

If genParams is true, this method generates new p, q and g parameters. If it is false, the method uses precomputed parameters for the modulus length requested. If there are no precomputed parameters for that modulus length, an exception will be thrown.

Java documentation for java.security.interfaces.DSAKeyPairGenerator.initialize(int, boolean, 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