Android Guides | Samples

Javax.Crypto.KeyAgreement Class

This class provides the functionality for a key exchange protocol.

See Also: KeyAgreement

Syntax

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

Remarks

This class provides the functionality for a key exchange protocol. This enables two or more parties to agree on a secret key for symmetric cryptography.

[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.KeyAgreement 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 KeyAgreement instance.

Public Properties

[read-only]
AlgorithmString. Returns the name of the key agreement algorithm.
[read-only]
ProviderProvider. Returns the provider for this KeyAgreement 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

DoPhase(IKey, Boolean) : IKey
Does the next (or the last) phase of the key agreement, using the specified key.
GenerateSecret() : Byte[]
Generates the shared secret.
GenerateSecret(String) : ISecretKey
Generates the shared secret.
GenerateSecret(Byte[], Int32) : Int32
Generates the shared secret and stores it into the buffer sharedSecred at offset.
static
GetInstance(String) : KeyAgreement
Creates a new KeyAgreement for the specified algorithm.
static
GetInstance(String, Provider) : KeyAgreement
Create a new KeyAgreement for the specified algorithm from the specified provider.
static
GetInstance(String, String) : KeyAgreement
Creates a new KeyAgreement for the specified algorithm from the specified provider.
Init(IKey)
Initializes this KeyAgreement with the specified key.
Init(IKey, SecureRandom)
Initializes this KeyAgreement with the specified key and the specified randomness source.
Init(IKey, IAlgorithmParameterSpec)
Initializes this KeyAgreement with the specified key and the algorithm parameters.
Init(IKey, IAlgorithmParameterSpec, SecureRandom)
Initializes this KeyAgreement with the specified key, algorithm parameters and randomness source.