AlgorithmParameterGenerator Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The AlgorithmParameterGenerator
class is used to generate a
set of
parameters to be used with a certain algorithm.
[Android.Runtime.Register("java/security/AlgorithmParameterGenerator", DoNotGenerateAcw=true)]
public class AlgorithmParameterGenerator : Java.Lang.Object
[<Android.Runtime.Register("java/security/AlgorithmParameterGenerator", DoNotGenerateAcw=true)>]
type AlgorithmParameterGenerator = class
inherit Object
- Inheritance
- Attributes
Remarks
The AlgorithmParameterGenerator
class is used to generate a set of parameters to be used with a certain algorithm. Parameter generators are constructed using the getInstance
factory methods (static methods that return instances of a given class).
The object that will generate the parameters can be initialized in two different ways: in an algorithm-independent manner, or in an algorithm-specific manner:
<ul> <li>The algorithm-independent approach uses the fact that all parameter generators share the concept of a "size" and a source of randomness. The measure of size is universally shared by all algorithm parameters, though it is interpreted differently for different algorithms. For example, in the case of parameters for the DSA algorithm, "size" corresponds to the size of the prime modulus (in bits). When using this approach, algorithm-specific parameter generation values - if any - default to some standard values, unless they can be derived from the specified size.
<li>The other approach initializes a parameter generator object using algorithm-specific semantics, which are represented by a set of algorithm-specific parameter generation values. To generate Diffie-Hellman system parameters, for example, the parameter generation values usually consist of the size of the prime modulus and the size of the random exponent, both specified in number of bits. </ul>
In case the client does not explicitly initialize the AlgorithmParameterGenerator (via a call to an init
method), each provider must supply (and document) a default initialization. However, 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 AlgorithmParameterGenerator instead of relying on provider-specific defaults.
Android provides the following AlgorithmParameterGenerator
algorithms: <table> <thead> <tr> <th>Algorithm</th> <th>Supported API Levels</th> </tr> </thead> <tbody> <tr class="deprecated"> <td>AES</td> <td>1-8</td> </tr> <tr class="deprecated"> <td>DES</td> <td>1-8</td> </tr> <tr class="deprecated"> <td>DESede</td> <td>1-8</td> </tr> <tr> <td>DH</td> <td>1+</td> </tr> <tr> <td>DSA</td> <td>1+</td> </tr> </tbody> </table>
Added in 1.2.
Java documentation for java.security.AlgorithmParameterGenerator
.
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.
Constructors
AlgorithmParameterGenerator(AlgorithmParameterGeneratorSpi, Provider, String) |
Creates an AlgorithmParameterGenerator object. |
AlgorithmParameterGenerator(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
Properties
Algorithm |
Returns the standard name of the algorithm this parameter generator is associated with. |
Class |
Returns the runtime class of this |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
PeerReference | (Inherited from Object) |
Provider |
Returns the provider of this algorithm parameter generator object. |
ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. |
Methods
Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
GenerateParameters() |
Generates the parameters. |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
GetInstance(String, Provider) |
Returns an AlgorithmParameterGenerator object for generating a set of parameters to be used with the specified algorithm. |
GetInstance(String, String) |
Returns an AlgorithmParameterGenerator object for generating a set of parameters to be used with the specified algorithm. |
GetInstance(String) |
Returns an AlgorithmParameterGenerator object for generating a set of parameters to be used with the specified algorithm. |
Init(IAlgorithmParameterSpec, SecureRandom) |
Initializes this parameter generator with a set of algorithm-specific parameter generation values. |
Init(IAlgorithmParameterSpec) |
Initializes this parameter generator with a set of algorithm-specific parameter generation values. |
Init(Int32, SecureRandom) |
Initializes this parameter generator for a certain size and source of randomness. |
Init(Int32) |
Initializes this parameter generator for a certain size. |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
ToArray<T>() | (Inherited from Object) |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
UnregisterFromRuntime() | (Inherited from Object) |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |