Android Guides | Samples

Javax.Crypto.KeyGenerator Class

This class provides the public API for generating symmetric cryptographic keys.

See Also: KeyGenerator

Syntax

[Android.Runtime.Register("javax/crypto/KeyGenerator", DoNotGenerateAcw=true)]
public class KeyGenerator : Object

Remarks

This class provides the public API for generating symmetric cryptographic keys.

[Android Documentation]

Requirements

Namespace: Javax.Crypto
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1

The members of Javax.Crypto.KeyGenerator are listed below.

See Also: Object

Protected Constructors

A constructor used when creating managed representations of JNI objects; called by the runtime.
Creates a new KeyGenerator instance.

Public Properties

[read-only]
AlgorithmString. Returns the name of the key generation algorithm.
[read-only]
ProviderProvider. Returns the provider of this KeyGenerator instance.

Protected Properties

[read-only]
override
ThresholdClassIntPtr. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.
[read-only]
override
ThresholdTypeType. This API supports the Mono for Android infrastructure and is not intended to be used directly from your code.

Public Methods

GenerateKey() : ISecretKey
Generates a secret key.
static
GetInstance(String) : KeyGenerator
Creates a new KeyGenerator instance that provides the specified key algorithm,
static
GetInstance(String, Provider) : KeyGenerator
Creates a new KeyGenerator instance that provides the specified key algorithm from the specified provider.
static
GetInstance(String, String) : KeyGenerator
Creates a new KeyGenerator instance that provides the specified key algorithm from the specified provider.
Init(SecureRandom)
Initializes this KeyGenerator with the specified randomness source.
Init(IAlgorithmParameterSpec)
Initializes this KeyGenerator instance with the specified algorithm parameters.
Init(Int32)
Initializes this KeyGenerator instance for the specified key size (in bits).
Init(IAlgorithmParameterSpec, SecureRandom)
Initializes this KeyGenerator instance with the specified algorithm parameters and randomness source.
Init(Int32, SecureRandom)
Initializes this KeyGenerator instance for the specified key size (in bits) using the specified randomness source.