Udostępnij za pośrednictwem


KeyGenerator.Init Method

Definition

Overloads

Init(SecureRandom)

Initializes this key generator.

Init(IAlgorithmParameterSpec)

Initializes this key generator with the specified parameter set.

Init(Int32)

Initializes this key generator for a certain keysize.

Init(IAlgorithmParameterSpec, SecureRandom)

Initializes this key generator with the specified parameter set and a user-provided source of randomness.

Init(Int32, SecureRandom)

Initializes this key generator for a certain keysize, using a user-provided source of randomness.

Init(SecureRandom)

Initializes this key generator.

[Android.Runtime.Register("init", "(Ljava/security/SecureRandom;)V", "")]
public void Init (Java.Security.SecureRandom? random);
[<Android.Runtime.Register("init", "(Ljava/security/SecureRandom;)V", "")>]
member this.Init : Java.Security.SecureRandom -> unit

Parameters

random
SecureRandom

the source of randomness for this generator

Attributes

Remarks

Initializes this key generator.

Java documentation for javax.crypto.KeyGenerator.init(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

Init(IAlgorithmParameterSpec)

Initializes this key generator with the specified parameter set.

[Android.Runtime.Register("init", "(Ljava/security/spec/AlgorithmParameterSpec;)V", "")]
public void Init (Java.Security.Spec.IAlgorithmParameterSpec? params);
[<Android.Runtime.Register("init", "(Ljava/security/spec/AlgorithmParameterSpec;)V", "")>]
member this.Init : Java.Security.Spec.IAlgorithmParameterSpec -> unit

Parameters

params
IAlgorithmParameterSpec

the key generation parameters

Attributes

Exceptions

if the parameters cannot be used to initialize this key generator algorithm.

Remarks

Initializes this key generator with the specified parameter set.

If this key generator requires any random bytes, it will get them using the java.security.SecureRandom implementation of the highest-priority installed provider as the source of randomness. (If none of the installed providers supply an implementation of SecureRandom, a system-provided source of randomness will be used.)

Java documentation for javax.crypto.KeyGenerator.init(java.security.spec.AlgorithmParameterSpec).

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

Init(Int32)

Initializes this key generator for a certain keysize.

[Android.Runtime.Register("init", "(I)V", "")]
public void Init (int keysize);
[<Android.Runtime.Register("init", "(I)V", "")>]
member this.Init : int -> unit

Parameters

keysize
Int32

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

Attributes

Remarks

Initializes this key generator for a certain keysize.

If this key generator requires any random bytes, it will get them using the java.security.SecureRandom implementation of the highest-priority installed provider as the source of randomness. (If none of the installed providers supply an implementation of SecureRandom, a system-provided source of randomness will be used.)

Java documentation for javax.crypto.KeyGenerator.init(int).

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

Init(IAlgorithmParameterSpec, SecureRandom)

Initializes this key generator with the specified parameter set and a user-provided source of randomness.

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

Parameters

params
IAlgorithmParameterSpec

the key generation parameters

random
SecureRandom

the source of randomness for this key generator

Attributes

Exceptions

if the parameters cannot be uses to initialize this key generator algorithm.

Remarks

Initializes this key generator with the specified parameter set and a user-provided source of randomness.

Java documentation for javax.crypto.KeyGenerator.init(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

Init(Int32, SecureRandom)

Initializes this key generator for a certain keysize, using a user-provided source of randomness.

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

Parameters

keysize
Int32

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

random
SecureRandom

the source of randomness for this key generator

Attributes

Remarks

Initializes this key generator for a certain keysize, using a user-provided source of randomness.

Java documentation for javax.crypto.KeyGenerator.init(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