public static class KeyStore.PasswordProtection extends Object implements KeyStore.ProtectionParameter, Destroyable
ProtectionParameterのパスワードベースの実装です。| コンストラクタと説明 |
|---|
PasswordProtection(char[] password)
パスワード・パラメータを作成します。
|
PasswordProtection(char[] password, String protectionAlgorithm, AlgorithmParameterSpec protectionParameters)
パスワード・パラメータを作成し、キーストア・エントリを暗号化するときに使用する保護アルゴリズムと関連パラメータを指定します。
|
| 修飾子と型 | メソッドと説明 |
|---|---|
void |
destroy()
パスワードをクリアします。
|
char[] |
getPassword()
パスワードを取得します。
|
String |
getProtectionAlgorithm()
保護アルゴリズムの名前を取得します。
|
AlgorithmParameterSpec |
getProtectionParameters()
保護アルゴリズムに対して指定されたパラメータを取得します。
|
boolean |
isDestroyed()
パスワードがクリアされているかどうかを判定します。
|
public PasswordProtection(char[] password)
指定されたpasswordは、複製されてから新しいPasswordProtectionオブジェクトに格納されます。
password - パスワード。nullの場合もあるpublic PasswordProtection(char[] password,
String protectionAlgorithm,
AlgorithmParameterSpec protectionParameters)
指定されたpasswordは、複製されてから新しいPasswordProtectionオブジェクトに格納されます。
password - パスワード。nullの場合もあるprotectionAlgorithm - 暗号化アルゴリズム名(たとえば、PBEWithHmacSHA256AndAES_256)。暗号化アルゴリズムの標準名については、Java暗号化アーキテクチャ標準アルゴリズム名のドキュメントのCipherの項を参照。protectionParameters - 暗号化アルゴリズム・パラメータの仕様。nullの場合もあるNullPointerException - protectionAlgorithmがnullの場合public String getProtectionAlgorithm()
'keystore.<type>.keyProtectionAlgorithm'セキュリティ・プロパティを使用して設定されます。たとえば、keystore.PKCS12.keyProtectionAlgorithmプロパティには、PKCS12キーストアで使用されるデフォルトの鍵保護アルゴリズムの名前が格納されます。このセキュリティ・プロパティが設定されていない場合は、実装固有のアルゴリズムが使用されます。nullpublic AlgorithmParameterSpec getProtectionParameters()
nullpublic char[] getPassword()
このメソッドはパスワードへの参照を返します。この配列の複製を作成した場合、不要になったパスワード情報は、呼出し側でゼロにする(消去する)必要があります。
nullの場合もあるIllegalStateException - パスワードがクリア(破棄)されている場合destroy()public void destroy()
throws DestroyFailedException
destroy、インタフェース: DestroyableDestroyFailedException - このメソッドがパスワードをクリアできなかった場合public boolean isDestroyed()
isDestroyed、インタフェース: Destroyable バグまたは機能を送信
詳細なAPIリファレンスおよび開発者ドキュメントについては、Java SEのドキュメントを参照してください。そのドキュメントには、概念的な概要、用語の定義、回避方法、有効なコード例などの、開発者を対象にしたより詳細な説明が含まれています。
Copyright© 1993, 2014, Oracle and/or its affiliates. All rights reserved.