|
Foundation 1.1.2 | |||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object java.security.AlgorithmParameterGenerator
public class AlgorithmParameterGenerator
AlgorithmParameterGenerator
クラスは、特定のアルゴリズムで使われるパラメータのセットを生成するために使用されます。パラメータジェネレータは、getInstance
ファクトリメソッド (指定したクラスのインスタンスを返す static メソッド) を使って構築されます。
パラメータを生成するオブジェクトは、アルゴリズム独立型またはアルゴリズム特定型の 2 つの方法で初期化できます。
クライアントが init
メソッドの呼び出しで、明示的に AlgorithmParameterGenerator を初期化しない場合には、各プロバイダはデフォルトによる初期化を提供し、ドキュメント化する必要があります。たとえば Sun のプロバイダは、1,024 ビットのモジュラスプライムサイズをデフォルトとして DSA パラメータを生成します。
AlgorithmParameters
,
AlgorithmParameterSpec
コンストラクタの概要 | |
---|---|
protected |
AlgorithmParameterGenerator(AlgorithmParameterGeneratorSpi paramGenSpi,
Provider provider,
String algorithm)
AlgorithmParameterGenerator オブジェクトを作成します。 |
メソッドの概要 | |
---|---|
AlgorithmParameters |
generateParameters()
パラメータを生成します。 |
String |
getAlgorithm()
パラメータジェネレータに関連したアルゴリズムの標準名を返します。 |
static AlgorithmParameterGenerator |
getInstance(String algorithm)
指定されたダイジェストアルゴリズムを実装する AlgorithmParameterGenerator オブジェクトを生成します。 |
static AlgorithmParameterGenerator |
getInstance(String algorithm,
Provider provider)
要求されたアルゴリズムのパラメータジェネレータを指定されたプロバイダから取得できる場合に、そのプロバイダが提供するアルゴリズムの AlgorithmParameterGenerator オブジェクトを生成します。 |
static AlgorithmParameterGenerator |
getInstance(String algorithm,
String provider)
要求されたアルゴリズムのパラメータジェネレータを指定されたプロバイダから取得できる場合に、そのプロバイダが提供するアルゴリズムの AlgorithmParameterGenerator オブジェクトを生成します。 |
Provider |
getProvider()
アルゴリズムパラメータジェネレータオブジェクトのプロバイダを返します。 |
void |
init(AlgorithmParameterSpec genParamSpec)
アルゴリズム特定型のパラメータ生成値のセットで、パラメータジェネレータを初期化します。 |
void |
init(AlgorithmParameterSpec genParamSpec,
SecureRandom random)
アルゴリズム特定型のパラメータ生成値のセットで、パラメータジェネレータを初期化します。 |
void |
init(int size)
特定のサイズに対して、パラメータジェネレータを初期化します。 |
void |
init(int size,
SecureRandom random)
特定のサイズと乱数発生の元に対して、パラメータジェネレータを初期化します。 |
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
---|
protected AlgorithmParameterGenerator(AlgorithmParameterGeneratorSpi paramGenSpi, Provider provider, String algorithm)
paramGenSpi
- 委譲先provider
- プロバイダalgorithm
- アルゴリズムメソッドの詳細 |
---|
public final String getAlgorithm()
public static AlgorithmParameterGenerator getInstance(String algorithm) throws NoSuchAlgorithmException
algorithm
- このパラメータジェネレータに関連付けられたアルゴリズムの文字列名
NoSuchAlgorithmException
- アルゴリズムがその環境で使用できない場合public static AlgorithmParameterGenerator getInstance(String algorithm, String provider) throws NoSuchAlgorithmException, NoSuchProviderException
algorithm
- アルゴリズムの文字列名provider
- プロバイダ名の文字列
NoSuchAlgorithmException
- プロバイダからそのアルゴリズムを取得できない場合
NoSuchProviderException
- プロバイダがその環境で使用できない場合
IllegalArgumentException
- プロバイダ名が null または空の場合Provider
public static AlgorithmParameterGenerator getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException
provider
を登録する必要はありません。
algorithm
- アルゴリズムの文字列名provider
- プロバイダ
NoSuchAlgorithmException
- プロバイダからそのアルゴリズムを取得できない場合
IllegalArgumentException
- provider
が null の場合Provider
public final Provider getProvider()
public final void init(int size)
SecureRandom
の実装が、乱数発生の元として使用されます。SecureRandom
を提供するプロバイダが 1 つもインストールされていない場合は、システムが提供する乱数発生の元が使用されます。
size
- サイズ (ビット数)public final void init(int size, SecureRandom random)
size
- サイズ (ビット数)random
- 乱数発生の元public final void init(AlgorithmParameterSpec genParamSpec) throws InvalidAlgorithmParameterException
SecureRandom
の実装が、乱数発生の元として使用されます。SecureRandom
を提供するプロバイダが 1 つもインストールされていない場合は、システムが提供する乱数発生の元が使用されます。
genParamSpec
- アルゴリズム特定型のパラメータ生成値のセット
InvalidAlgorithmParameterException
- 指定されたパラメータ生成値がこのパラメータジェネレータに不適切な場合public final void init(AlgorithmParameterSpec genParamSpec, SecureRandom random) throws InvalidAlgorithmParameterException
genParamSpec
- アルゴリズム特定型のパラメータ生成値のセットrandom
- 乱数発生の元
InvalidAlgorithmParameterException
- 指定されたパラメータ生成値がこのパラメータジェネレータに不適切な場合public final AlgorithmParameters generateParameters()
|
Foundation 1.1.2 | |||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。