JavaTM 2 Platform
Standard Ed. 5.0

javax.crypto
Ŭ·¡½º EncryptedPrivateKeyInfo

java.lang.Object 
  »óÀ§¸¦ È®Àå javax.crypto.EncryptedPrivateKeyInfo

public class EncryptedPrivateKeyInfo
extends Object

ÀÌ Å¬·¡½º´Â PKCS #8 ·Î Á¤Àǵǰí ÀÖ´Â EncryptedPrivateKeyInfo ÇüÀ» ±¸ÇöÇÕ´Ï´Ù.

±× ASN. 1 Á¤ÀÇ´Â ´ÙÀ½°ú °°½À´Ï´Ù.


 EncryptedPrivateKeyInfo ::=  SEQUENCE {
     encryptionAlgorithm   AlgorithmIdentifier,
     encryptedData   OCTET STRING }
 
 AlgorithmIdentifier  ::=  SEQUENCE  {
     algorithm              OBJECT IDENTIFIER,
     parameters             ANY DEFINED BY algorithm OPTIONAL  }
 

µµÀÔµÈ ¹öÀü :
1.4
°ü·Ã Ç׸ñ:
PKCS8EncodedKeySpec

»ý¼ºÀÚ °³¿ä
EncryptedPrivateKeyInfo (AlgorithmParameters  algParams, byte[] encryptedData)
          ¾Ïȣȭ ¾Ë°í¸®Áò ÆĶó¹ÌÅÍ¿Í ¾ÏȣȭµÈ µ¥ÀÌÅͷκÎÅÍ EncryptedPrivateKeyInfo¸¦ ±¸ÃàÇÕ´Ï´Ù.
EncryptedPrivateKeyInfo (byte[] encoded)
          ±× ASN. 1 ÀÎÄÚµùÀ¸·ÎºÎÅÍ EncryptedPrivateKeyInfo¸¦ ±¸Ãà (Áï Çؼ®)ÇÕ´Ï´Ù.
EncryptedPrivateKeyInfo (String  algName, byte[] encryptedData)
          ¾Ïȣȭ ¾Ë°í¸®Áò¸íÀ¸·Î ¾ÏȣȭµÈ µ¥ÀÌÅͷκÎÅÍ EncryptedPrivateKeyInfo¸¦ ±¸ÃàÇÕ´Ï´Ù.
 
¸Þ¼­µå °³¿ä
 String getAlgName ()
          ¾Ïȣȭ ¾Ë°í¸®ÁòÀ» ¸®ÅÏÇÕ´Ï´Ù.
 AlgorithmParameters getAlgParameters ()
          ¾Ïȣȭ ¾Ë°í¸®ÁòÀ¸·Î »ç¿ëµÇ´Â ¾Ë°í¸®Áò ÆĶó¹ÌÅ͸¦ ¸®ÅÏÇÕ´Ï´Ù.
 byte[] getEncoded ()
          ÀÌ °´Ã¼ÀÇ ASN. 1 ÀÎÄÚµùÀ» ¸®ÅÏÇÕ´Ï´Ù.
 byte[] getEncryptedData ()
          ¾ÏȣȭµÈ µ¥ÀÌÅ͸¦ ¸®ÅÏÇÕ´Ï´Ù.
 PKCS8EncodedKeySpec getKeySpec (Cipher  cipher)
          ¾ÏȣȭµÈ µ¥ÀÌÅͷκÎÅÍ ¾ÏȣȭµÈ PKCS8EncodedKeySpec °´Ã¼¸¦ ÃßÃâÇØ ¸®ÅÏÇÕ´Ï´Ù.
 PKCS8EncodedKeySpec getKeySpec (Key  decryptKey)
          ¾ÏȣȭµÈ µ¥ÀÌÅͷκÎÅÍ ¾ÏȣȭµÈ PKCS8EncodedKeySpec °´Ã¼¸¦ ÃßÃâÇØ ¸®ÅÏÇÕ´Ï´Ù.
 PKCS8EncodedKeySpec getKeySpec (Key  decryptKey, Provider  provider)
          ¾ÏȣȭµÈ µ¥ÀÌÅͷκÎÅÍ ¾ÏȣȭµÈ PKCS8EncodedKeySpec °´Ã¼¸¦ ÃßÃâÇØ ¸®ÅÏÇÕ´Ï´Ù.
 PKCS8EncodedKeySpec getKeySpec (Key  decryptKey, String  providerName)
          ¾ÏȣȭµÈ µ¥ÀÌÅͷκÎÅÍ ¾ÏȣȭµÈ PKCS8EncodedKeySpec °´Ã¼¸¦ ÃßÃâÇØ ¸®ÅÏÇÕ´Ï´Ù.
 
Ŭ·¡½º java.lang. Object ·ÎºÎÅÍ »ó¼ÓµÈ ¸Þ¼­µå
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

»ý¼ºÀÚ »ó¼¼

EncryptedPrivateKeyInfo

public EncryptedPrivateKeyInfo(byte[] encoded)
                        throws IOException 
±× ASN. 1 ÀÎÄÚµùÀ¸·ÎºÎÅÍ EncryptedPrivateKeyInfo¸¦ ±¸Ãà (Áï Çؼ®)ÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
encoded - ÀÌ °´Ã¼ÀÇ ASN. 1 ÀÎÄÚµù. ¹è¿­ÀÇ ³»¿ëÀº ÇâÈÄ º¯°æµÇÁö ¾Ê°Ô º¸È£ÇÏ´Â ¸ñÀûÀ¸·Î Ä«ÇǵȴÙ
¿¹¿Ü:
NullPointerException - encoded°¡ nullÀÎ °æ¿ì
IOException - ASN. 1 ÀÎÄÚµùÀÇ Çؼ®½Ã¿¡ ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì

EncryptedPrivateKeyInfo

public EncryptedPrivateKeyInfo(String  algName,
                               byte[] encryptedData)
                        throws NoSuchAlgorithmException 
¾Ïȣȭ ¾Ë°í¸®Áò¸íÀ¸·Î ¾ÏȣȭµÈ µ¥ÀÌÅͷκÎÅÍ EncryptedPrivateKeyInfo¸¦ ±¸ÃàÇÕ´Ï´Ù.

ÁÖ: ÀÌ »ý¼ºÀÚ´Â ¾Ë°í¸®Áò ÆĶó¹ÌÅÍÀÇ °ªÀ¸·Î Çؼ­ nullÀ» »ç¿ëÇÕ´Ï´Ù. ¾Ïȣȭ ¾Ë°í¸®ÁòÀÇ ÆĶó¹ÌÅÍ¿¡ null ÀÌ¿ÜÀÇ °ªÀÌ ¼³Á¤µÇ¾î ÀÖ´Â °æ¿ì´Â EncryptedPrivateKeyInfo(AlgorithmParameters, byte[])µîÀÇ ´Ù¸¥ »ý¼ºÀÚ¸¦ »ç¿ëÇØ ÁÖ¼¼¿ä.

ÆĶó¹ÌÅÍ:
algName - ¾Ïȣȭ ¾Ë°í¸®ÁòÀÇ À̸§. ¾Ïȣȭ ¾Ë°í¸®ÁòÀÇ Ç¥ÁØ¸í¿¡ ´ëÇؼ­´Â ¡¸Java ¾Ïȣȭ È®Àå ±â´É ·¹ÆÛ·±½º °¡À̵塹ÀÇ ºÎ·Ï A¸¦ ÂüÁ¶
encryptedData - ¾ÏȣȭµÈ µ¥ÀÌÅÍ. encrypedData ³»¿ëÀº ÇâÈÄ º¯°æµÇÁö ¾Ê°Ô º¸È£ÇÏ´Â ¸ñÀûÀ¸·Î ÀÌ °´Ã¼ÀÇ ±¸Ãà½Ã¿¡ Ä«ÇǵȴÙ
¿¹¿Ü:
NullPointerException - algName ¶Ç´Â encryptedData°¡ nullÀÎ °æ¿ì
IllegalArgumentException - encryptedData°¡ °ø¹é (±æÀÌ 0)ÀÇ °æ¿ì
NoSuchAlgorithmException - ÁöÁ¤µÈ algName°¡ Áö¿ø µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì

EncryptedPrivateKeyInfo

public EncryptedPrivateKeyInfo(AlgorithmParameters  algParams,
                               byte[] encryptedData)
                        throws NoSuchAlgorithmException 
¾Ïȣȭ ¾Ë°í¸®Áò ÆĶó¹ÌÅÍ¿Í ¾ÏȣȭµÈ µ¥ÀÌÅͷκÎÅÍ EncryptedPrivateKeyInfo¸¦ ±¸ÃàÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
algParams - ¾Ïȣȭ ¾Ë°í¸®ÁòÀÇ ¾Ë°í¸®Áò ÆĶó¹ÌÅÍ. algParams.getEncoded()´Â EncryptedPrivateKeyInfo Çü AlgorithmIdentifer ÄÄÆÛ³ÍÆ®ÀÇ, parameters ÇʵåÀÇ ANS. 1 ¾ÏȣȭµÈ ¹ÙÀÌÆ®¸¦ µ¹·ÁÁÖ´Â
encryptedData - ¾ÏȣȭµÈ µ¥ÀÌÅÍ. encrypedData ³»¿ëÀº ÇâÈÄ º¯°æµÇÁö ¾Ê°Ô º¸È£ÇÏ´Â ¸ñÀûÀ¸·Î ÀÌ °´Ã¼ÀÇ ±¸Ãà½Ã¿¡ Ä«ÇǵȴÙ
¿¹¿Ü:
NullPointerException - algParams ¶Ç´Â encryptedData°¡ nullÀÎ °æ¿ì
IllegalArgumentException - encryptedData°¡ °ø¹é (±æÀÌ 0)ÀÇ °æ¿ì
NoSuchAlgorithmException - ÁöÁ¤µÈ algParams ÆĶó¹ÌÅÍÀÇ ÁöÁ¤µÈ algName°¡ Áö¿ø µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì
¸Þ¼­µåÀÇ »ó¼¼

getAlgName

public String  getAlgName()
¾Ïȣȭ ¾Ë°í¸®ÁòÀ» ¸®ÅÏÇÕ´Ï´Ù.

ÁÖ: »ý¼ºÀÚ À¸·Î ÁöÁ¤µÈ À̸§¿¡ ´ëÀÀÇϴ ǥÁظíÀÌ ÀÖ´Â °æ¿ì´Â ÁöÁ¤µÈ À̸§ ´ë½Å¿¡ Ç¥ÁظíÀÌ ¸®Åϵ˴ϴ٠. ¾Ïȣȭ ¾Ë°í¸®ÁòÀÇ Ç¥ÁØ¸í¿¡ ´ëÇؼ­´Â ¡¸Java ¾Ïȣȭ È®Àå ±â´É ·¹ÆÛ·±½º °¡À̵塹ÀÇ ºÎ·Ï A¸¦ ÂüÁ¶ÇϽʽÿÀ.

¹Ýȯ°ª:
¾Ïȣȭ ¾Ë°í¸®ÁòÀÇ À̸§

getAlgParameters

public AlgorithmParameters  getAlgParameters()
¾Ïȣȭ ¾Ë°í¸®ÁòÀ¸·Î »ç¿ëµÇ´Â ¾Ë°í¸®Áò ÆĶó¹ÌÅ͸¦ ¸®ÅÏÇÕ´Ï´Ù.

¹Ýȯ°ª:
¾Ë°í¸®Áò ÆĶó¹ÌÅÍ

getEncryptedData

public byte[] getEncryptedData()
¾ÏȣȭµÈ µ¥ÀÌÅ͸¦ ¸®ÅÏÇÕ´Ï´Ù.

¹Ýȯ°ª:
¾ÏȣȭµÈ µ¥ÀÌÅÍ. ÀÌ ¸Þ¼­µå°¡ ºÒ·Á °¥ ¶§¸¶´Ù »õ·Î¿îÀÇ ¹è¿­À» µ¹·ÁÁØ´Ù

getKeySpec

public PKCS8EncodedKeySpec  getKeySpec(Cipher  cipher)
                               throws InvalidKeySpecException 
¾ÏȣȭµÈ µ¥ÀÌÅͷκÎÅÍ ¾ÏȣȭµÈ PKCS8EncodedKeySpec °´Ã¼¸¦ ÃßÃâÇØ ¸®ÅÏÇÕ´Ï´Ù.
ÁÖ: ¾ÏȣȭµÈ PKCS8EncodedKeySpec °´Ã¼¸¦ Á¤»óÀûÀ¸·Î ²¨³»·Á¸é, cipher¸¦ Cipher.DECRYPT_MODE ¶Ç´Â Cipher.UNWRAP_MODE¿¡ ÃʱâÈ­ÇÒ ÇÊ¿ä°¡ ÀÖ½À´Ï´Ù. ÀÌ ¶§, ¾ÏȣȭµÈ µ¥ÀÌÅÍÀÇ »ý¼º¿¡ »ç¿ëµÈ °Í°ú °°Àº Å°¿Í ÆĶó¹ÌÅ͸¦ »ç¿ëÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
cipher - ¾ÏȣȭµÈ µ¥ÀÌÅÍÀÇ º¹È£È­¿¡ »ç¿ëÇÏ´Â ÃʱâÈ­µÈ ¾ÏÈ£ °´Ã¼
¹Ýȯ°ª:
PKCS8EncodedKeySpec °´Ã¼
¿¹¿Ü:
NullPointerException - cipher°¡ nullÀÎ °æ¿ì
InvalidKeySpecException - ÁöÁ¤µÈ ¾ÏÈ£°¡ ¾ÏȣȭµÈ µ¥ÀÌÅÍ¿¡ ºÎÀûÀýÇÑ °æ¿ì, ¶Ç´Â ¾ÏȣȭµÈ µ¥ÀÌÅÍ°¡ ¸Á°¡Á® ÀÖ¾î º¹È£È­ ÇÒ ¼ö ¾ø´Â °æ¿ì

getKeySpec

public PKCS8EncodedKeySpec  getKeySpec(Key  decryptKey)
                               throws NoSuchAlgorithmException,

                                      InvalidKeyException 
¾ÏȣȭµÈ µ¥ÀÌÅͷκÎÅÍ ¾ÏȣȭµÈ PKCS8EncodedKeySpec °´Ã¼¸¦ ÃßÃâÇØ ¸®ÅÏÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
decryptKey - ¾ÏȣȭµÈ µ¥ÀÌÅÍÀÇ º¹È£È­¿¡ »ç¿ëÇÏ´Â Å°
¹Ýȯ°ª:
PKCS8EncodedKeySpec °´Ã¼
¿¹¿Ü:
NullPointerException - decryptKey°¡ nullÀÎ °æ¿ì
NoSuchAlgorithmException - ¾ÏȣȭµÈ µ¥ÀÌÅ͸¦ º¹È£È­Çϱâ À§ÇÑ ÀûÀýÇÑ ¾ÏÈ£°¡ ¹ß°ßµÇÁö ¾Ê´Â °æ¿ì
InvalidKeyException - ¾ÏȣȭµÈ µ¥ÀÌÅ͸¦ decryptKey·Î º¹È£È­ ÇÒ ¼ö ¾ø´Â °æ¿ì. ¶Ç´Â º¹È£È­¿¡ ÀÇÇØ ¾òÀ» ¼ö ÀÖ´ø PKCS8KeySpec°¡ À¯È¿ÇÏÁö ¾ÊÀº °æ¿ì

getKeySpec

public PKCS8EncodedKeySpec  getKeySpec(Key  decryptKey,
                                      String  providerName)
                               throws NoSuchProviderException,

                                      NoSuchAlgorithmException,

                                      InvalidKeyException 
¾ÏȣȭµÈ µ¥ÀÌÅͷκÎÅÍ ¾ÏȣȭµÈ PKCS8EncodedKeySpec °´Ã¼¸¦ ÃßÃâÇØ ¸®ÅÏÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
decryptKey - ¾ÏȣȭµÈ µ¥ÀÌÅÍÀÇ º¹È£È­¿¡ »ç¿ëÇÏ´Â Å°
providerName - »ç¿ëÇÏ´Â Cipher ±¸ÇöÀÇ ÇÁ·Î¹ÙÀÌ´õÀÇ À̸§
¹Ýȯ°ª:
PKCS8EncodedKeySpec °´Ã¼
¿¹¿Ü:
NullPointerException - decryptKey ¶Ç´Â providerName°¡ nullÀÎ °æ¿ì
NoSuchProviderException - providerName·Î ÁöÁ¤µÈ ÇÁ·Î¹ÙÀÌ´õ°¡ µî·ÏµÇÁö ¾ÊÀº °æ¿ì
NoSuchAlgorithmException - ¾ÏȣȭµÈ µ¥ÀÌÅ͸¦ º¹È£È­Çϱâ À§ÇÑ ÀûÀýÇÑ ¾ÏÈ£°¡ ¹ß°ßµÇÁö ¾Ê´Â °æ¿ì
InvalidKeyException - ¾ÏȣȭµÈ µ¥ÀÌÅ͸¦ decryptKey·Î º¹È£È­ ÇÒ ¼ö ¾ø´Â °æ¿ì. ¶Ç´Â º¹È£È­¿¡ ÀÇÇØ ¾òÀ» ¼ö ÀÖ´ø PKCS8KeySpec°¡ À¯È¿ÇÏÁö ¾ÊÀº °æ¿ì

getKeySpec

public PKCS8EncodedKeySpec  getKeySpec(Key  decryptKey,
                                      Provider  provider)
                               throws NoSuchAlgorithmException,

                                      InvalidKeyException 
¾ÏȣȭµÈ µ¥ÀÌÅͷκÎÅÍ ¾ÏȣȭµÈ PKCS8EncodedKeySpec °´Ã¼¸¦ ÃßÃâÇØ ¸®ÅÏÇÕ´Ï´Ù.

ÆĶó¹ÌÅÍ:
decryptKey - ¾ÏȣȭµÈ µ¥ÀÌÅÍÀÇ º¹È£È­¿¡ »ç¿ëÇÏ´Â Å°
provider - »ç¿ëÇÏ´Â Cipher ±¸ÇöÀÇ ÇÁ·Î¹ÙÀÌ´õÀÇ À̸§
¹Ýȯ°ª:
PKCS8EncodedKeySpec °´Ã¼
¿¹¿Ü:
NullPointerException - decryptKey ¶Ç´Â provider°¡ nullÀÎ °æ¿ì
NoSuchAlgorithmException - ¾ÏȣȭµÈ µ¥ÀÌÅ͸¦ º¹È£È­Çϱâ À§ÇÑ ÀûÀýÇÑ ¾ÏÈ£°¡ provider¿¡ ¹ß°ßµÇÁö ¾Ê´Â °æ¿ì
InvalidKeyException - ¾ÏȣȭµÈ µ¥ÀÌÅ͸¦ decryptKey·Î º¹È£È­ ÇÒ ¼ö ¾ø´Â °æ¿ì. ¶Ç´Â º¹È£È­¿¡ ÀÇÇØ ¾òÀ» ¼ö ÀÖ´ø PKCS8KeySpec°¡ À¯È¿ÇÏÁö ¾ÊÀº °æ¿ì

getEncoded

public byte[] getEncoded()
                  throws IOException 
ÀÌ °´Ã¼ÀÇ ASN. 1 ÀÎÄÚµùÀ» ¸®ÅÏÇÕ´Ï´Ù.

¹Ýȯ°ª:
ASN. 1 ÀÎÄÚµù. ÀÌ ¸Þ¼­µå°¡ ºÒ·Á °¥ ¶§¸¶´Ù »õ·Î¿îÀÇ ¹è¿­À» µ¹·ÁÁØ´Ù
¿¹¿Ü:
IOException - ±× ASN. 1 ÀÎÄÚµùÀÇ ±¸Ãà½Ã¿¡ ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì

JavaTM 2 Platform
Standard Ed. 5.0

Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.