JCaosLib
V1.4.4.0

com.dreamsecurity.jcaos.pkcs
Class PKCS8PrivateKeyInfo

java.lang.Object
  extended bycom.dreamsecurity.jcaos.pkcs.PKCS8PrivateKeyInfo

public class PKCS8PrivateKeyInfo
extends java.lang.Object

°³ÀÎŰ Á¤º¸¸¦ ´Ù·ç±â À§ÇÑ Å¬·¡½ºÀÌ´Ù.

°³ÀÎŰ Á¤º¸ÀÇ ASN.1 Æ÷¸ËÀº ´ÙÀ½°ú °°´Ù.

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

Since:
1.0.0.0

Constructor Summary
PKCS8PrivateKeyInfo(java.security.PrivateKey priKey)
          °³ÀÎ۸¦ ÀÔ·Â¹Þ¾Æ PKCS8PrivateKeyInfo Ŭ·¡½º¸¦ ÃʱâÈ­ ÇÑ´Ù.
PKCS8PrivateKeyInfo(java.security.PrivateKey priKey, byte[] random)
          °³ÀÎŰ Á¤º¸¿Í º»ÀÎÈ®ÀÎÀ» À§ÇÑ ·£´ý°ªÀ» ÀÔ·Â¹Þ¾Æ PKCS8PrivateKeyInfo Ŭ·¡½º¸¦ ÃʱâÈ­ ÇÑ´Ù.
 
Method Summary
 byte[] getEncoded()
          DER ÀÎÄÚµù µÇ¾îÀÖ´Â °³ÀÎŰ Á¤º¸¸¦ ȹµæÇÑ´Ù.
static PKCS8PrivateKeyInfo getInstance(byte[] data)
          °³ÀÎŰ Á¤º¸¸¦ ÀÔ·ÂÇÏ¿© PKCS8PrivateKeyInfo °´Ã¼·Î º¯È¯ÇÑ´Ù.
static PKCS8PrivateKeyInfo getInstance(java.lang.Object o)
          °³ÀÎŰ Á¤º¸¸¦ ÀÔ·ÂÇÏ¿© PKCS8PrivateKeyInfo °´Ã¼·Î º¯È¯ÇÑ´Ù.
 int getKeySize()
          ÇØ´ç °³ÀÎŰ ¾Ë°í¸®ÁòÀÇ Å° ±æÀ̸¦ ȹµæÇÑ´Ù.
 java.security.PrivateKey getPrivateKey()
          °³ÀÎ۸¦ ȹµæÇÑ´Ù.
 byte[] getRandom()
          º»ÀÎÈ®ÀÎÀ» °ËÁõÀ» À§ÇØ ÇÊ¿äÇÑ ·£´ý°ªÀ» ȹµæÇÑ´Ù.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PKCS8PrivateKeyInfo

public PKCS8PrivateKeyInfo(java.security.PrivateKey priKey,
                           byte[] random)
                    throws java.io.IOException
°³ÀÎŰ Á¤º¸¿Í º»ÀÎÈ®ÀÎÀ» À§ÇÑ ·£´ý°ªÀ» ÀÔ·Â¹Þ¾Æ PKCS8PrivateKeyInfo Ŭ·¡½º¸¦ ÃʱâÈ­ ÇÑ´Ù.

Parameters:
priKey - PrivateKey Çü½ÄÀÇ °³ÀÎŰ
random - º»ÀÎÈ®ÀÎÀ» À§ÇÑ ·£´ý°ª
Throws:
java.io.IOException - °³ÀÎŰ µðÄÚµù ½ÇÆÐ½Ã ¹ß»ý

PKCS8PrivateKeyInfo

public PKCS8PrivateKeyInfo(java.security.PrivateKey priKey)
                    throws java.io.IOException
°³ÀÎ۸¦ ÀÔ·Â¹Þ¾Æ PKCS8PrivateKeyInfo Ŭ·¡½º¸¦ ÃʱâÈ­ ÇÑ´Ù.

Parameters:
priKey - PrivateKey Çü½ÄÀÇ °³ÀÎŰ
Throws:
java.io.IOException - °³ÀÎŰ µðÄÚµù ½ÇÆÐ½Ã ¹ß»ý
Method Detail

getInstance

public static PKCS8PrivateKeyInfo getInstance(byte[] data)
                                       throws java.io.IOException,
                                              java.security.NoSuchAlgorithmException,
                                              java.security.NoSuchProviderException,
                                              java.security.spec.InvalidKeySpecException
°³ÀÎŰ Á¤º¸¸¦ ÀÔ·ÂÇÏ¿© PKCS8PrivateKeyInfo °´Ã¼·Î º¯È¯ÇÑ´Ù.

Parameters:
data - DER ÀÎÄÚµùµÈ ÇüÅÂÀÇ °³ÀÎŰ Á¤º¸
Returns:
PKCS8PrivateKeyInfo ÇüÅÂÀÇ °´Ã¼
Throws:
java.io.IOException - µðÄÚµù ½ÇÆÐ½Ã ¹ß»ý
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException
java.security.spec.InvalidKeySpecException

getInstance

public static PKCS8PrivateKeyInfo getInstance(java.lang.Object o)
                                       throws java.io.IOException,
                                              java.security.NoSuchAlgorithmException,
                                              java.security.NoSuchProviderException,
                                              java.security.spec.InvalidKeySpecException
°³ÀÎŰ Á¤º¸¸¦ ÀÔ·ÂÇÏ¿© PKCS8PrivateKeyInfo °´Ã¼·Î º¯È¯ÇÑ´Ù.

Parameters:
o - °³ÀÎŰ Á¤º¸ (DER ÀÎÄÚµùµÈ °ª ¶Ç´Â ASN.1 ÇüÅÂ)
Returns:
PKCS8PrivateKeyInfo ÇüÅÂÀÇ °´Ã¼
Throws:
java.io.IOException - µðÄÚµù ½ÇÆÐ½Ã ¹ß»ý
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException
java.security.spec.InvalidKeySpecException

getPrivateKey

public java.security.PrivateKey getPrivateKey()
°³ÀÎ۸¦ ȹµæÇÑ´Ù.

Returns:
°³ÀÎŰ

getRandom

public byte[] getRandom()
º»ÀÎÈ®ÀÎÀ» °ËÁõÀ» À§ÇØ ÇÊ¿äÇÑ ·£´ý°ªÀ» ȹµæÇÑ´Ù.

Returns:
·£´ý°ª. ¸¸¾à ÇØ´ç Á¤º¸°¡ ¾øÀ¸¸é nullÀÌ ¸®ÅϵÊ.

getKeySize

public int getKeySize()
ÇØ´ç °³ÀÎŰ ¾Ë°í¸®ÁòÀÇ Å° ±æÀ̸¦ ȹµæÇÑ´Ù.

Returns:
Ű ±æÀÌ (etc. 1024, 2048)
Since:
1.4.1.0

getEncoded

public byte[] getEncoded()
DER ÀÎÄÚµù µÇ¾îÀÖ´Â °³ÀÎŰ Á¤º¸¸¦ ȹµæÇÑ´Ù.

Returns:
DER ÀÎÄÚµù µÇ¾îÀÖ´Â °³ÀÎŰ Á¤º¸

JCaosLib
V1.4.4.0


Copyright ¨Ï2007-2011 DreamSecurity Co.,Ltd . All rights reserved