JavaTM 2 Platform
Standard Ed. 5.0

java.security.spec
クラス PKCS8EncodedKeySpec

java.lang.Object
  上位を拡張 java.security.spec.EncodedKeySpec
      上位を拡張 java.security.spec.PKCS8EncodedKeySpec
すべての実装されたインタフェース:
KeySpec

public class PKCS8EncodedKeySpec
extends EncodedKeySpec

ASN.1 PrivateKeyInfoで指定された形式に従って符号化された、非公開鍵の ASN.1 での符号化を表します。PrivateKeyInfo の構文は次のとおり PKCS#8 標準で定義します。


 PrivateKeyInfo ::= SEQUENCE {
   version Version,
   privateKeyAlgorithm PrivateKeyAlgorithmIdentifier,
   privateKey PrivateKey,
   attributes [0] IMPLICIT Attributes OPTIONAL }

 Version ::= INTEGER

 PrivateKeyAlgorithmIdentifier ::= AlgorithmIdentifier

 PrivateKey ::= OCTET STRING

 Attributes ::= SET OF Attribute
 

導入されたバージョン:
1.2
関連項目:
Key, KeyFactory, KeySpec, EncodedKeySpec, X509EncodedKeySpec

コンストラクタの概要
PKCS8EncodedKeySpec(byte[] encodedKey)
          指定の符号化された鍵を使って新しい PKCS8EncodedKeySpec を作成します。
 
メソッドの概要
 byte[] getEncoded()
          PKCS #8 標準に従って符号化された鍵のバイトを返します。
 String getFormat()
          この鍵仕様に関連した符号化形式の名前を返します。
 
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

PKCS8EncodedKeySpec

public PKCS8EncodedKeySpec(byte[] encodedKey)
指定の符号化された鍵を使って新しい PKCS8EncodedKeySpec を作成します。

パラメータ:
encodedKey - 鍵。PKCS #8 標準に従って符号化されていると見なされる。この配列の内容は、後続の変更に影響されないようにコピーされる
メソッドの詳細

getEncoded

public byte[] getEncoded()
PKCS #8 標準に従って符号化された鍵のバイトを返します。

オーバーライド:
クラス EncodedKeySpec 内の getEncoded
戻り値:
PKCS #8 で符号化された鍵。このメソッドが呼び出されるたびに新しい配列を返す

getFormat

public final String getFormat()
この鍵仕様に関連した符号化形式の名前を返します。

定義:
クラス EncodedKeySpec 内の getFormat
戻り値:
文字列「PKCS#8」

JavaTM 2 Platform
Standard Ed. 5.0

バグの報告と機能のリクエスト
さらに詳しい API リファレンスおよび開発者ドキュメントについては、Java 2 SDK SE 開発者用ドキュメントを参照してください。開発者向けの詳細な解説、概念の概要、用語の定義、バグの回避策、およびコード実例が含まれています。

Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。