Condividi tramite


IDSAKeyPairGenerator Interface

Definition

An interface to an object capable of generating DSA key pairs.

[Android.Runtime.Register("java/security/interfaces/DSAKeyPairGenerator", "", "Java.Security.Interfaces.IDSAKeyPairGeneratorInvoker")]
public interface IDSAKeyPairGenerator : Android.Runtime.IJavaObject, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("java/security/interfaces/DSAKeyPairGenerator", "", "Java.Security.Interfaces.IDSAKeyPairGeneratorInvoker")>]
type IDSAKeyPairGenerator = interface
    interface IJavaObject
    interface IDisposable
    interface IJavaPeerable
Attributes
Implements

Remarks

An interface to an object capable of generating DSA key pairs.

The initialize methods may each be called any number of times. If no initialize method is called on a DSAKeyPairGenerator, each provider that implements this interface should supply (and document) a default initialization. Note that defaults may vary across different providers. Additionally, the default value for a provider may change in a future version. Therefore, it is recommended to explicitly initialize the DSAKeyPairGenerator instead of relying on provider-specific defaults.

Users wishing to indicate DSA-specific parameters, and to generate a key pair suitable for use with the DSA algorithm typically

<ol>

<li>Get a key pair generator for the DSA algorithm by calling the KeyPairGenerator getInstance method with "DSA" as its argument.

<li>Check if the returned key pair generator is an instance of DSAKeyPairGenerator before casting the result to a DSAKeyPairGenerator and calling one of the initialize methods from this DSAKeyPairGenerator interface.

<li>Generate a key pair by calling the generateKeyPair method of the KeyPairGenerator class.

</ol>

Note: it is not always necessary to do algorithm-specific initialization for a DSA key pair generator. That is, it is not always necessary to call an initialize method in this interface. Algorithm-independent initialization using the initialize method in the KeyPairGenerator interface is all that is needed when you accept defaults for algorithm-specific parameters.

Note: Some earlier implementations of this interface may not support larger values of DSA parameters such as 3072-bit.

Added in 1.1.

Java documentation for java.security.interfaces.DSAKeyPairGenerator.

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.

Properties

Handle

Gets the JNI value of the underlying Android object.

(Inherited from IJavaObject)
JniIdentityHashCode

Returns the value of java.lang.System.identityHashCode() for the wrapped instance.

(Inherited from IJavaPeerable)
JniManagedPeerState

State of the managed peer.

(Inherited from IJavaPeerable)
JniPeerMembers

Member access and invocation support.

(Inherited from IJavaPeerable)
PeerReference

Returns a JniObjectReference of the wrapped Java object instance.

(Inherited from IJavaPeerable)

Methods

Disposed()

Called when the instance has been disposed.

(Inherited from IJavaPeerable)
DisposeUnlessReferenced()

If there are no outstanding references to this instance, then calls Dispose(); otherwise, does nothing.

(Inherited from IJavaPeerable)
Finalized()

Called when the instance has been finalized.

(Inherited from IJavaPeerable)
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.

SetJniIdentityHashCode(Int32)

Set the value returned by JniIdentityHashCode.

(Inherited from IJavaPeerable)
SetJniManagedPeerState(JniManagedPeerStates) (Inherited from IJavaPeerable)
SetPeerReference(JniObjectReference)

Set the value returned by PeerReference.

(Inherited from IJavaPeerable)
UnregisterFromRuntime()

Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations.

(Inherited from IJavaPeerable)

Extension Methods

JavaCast<TResult>(IJavaObject)

Performs an Android runtime-checked type conversion.

JavaCast<TResult>(IJavaObject)
GetJniTypeName(IJavaPeerable)

Applies to