|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
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
の実装を提供するプロバイダがインストールされていない場合は、システムが提供する乱数の発生源が使用されます。
size
- サイズ (ビット数)public final void init(int size, SecureRandom random)
size
- サイズ (ビット数)random
- 乱数の発生源public final void init(AlgorithmParameterSpec genParamSpec) throws InvalidAlgorithmParameterException
SecureRandom
の実装が、乱数の発生源として使用されます。SecureRandom
の実装を提供するプロバイダがインストールされていない場合は、システムが提供する乱数の発生源が使用されます。
genParamSpec
- アルゴリズム特定型のパラメータ生成値のセット
InvalidAlgorithmParameterException
- 指定されたパラメータ生成値がパラメータジェネレータに不適切な場合public final void init(AlgorithmParameterSpec genParamSpec, SecureRandom random) throws InvalidAlgorithmParameterException
genParamSpec
- アルゴリズム特定型のパラメータ生成値のセットrandom
- 乱数の発生源
InvalidAlgorithmParameterException
- 指定されたパラメータ生成値がパラメータジェネレータに不適切な場合public final AlgorithmParameters generateParameters()
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。