|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
java.lang.Objectjavax.crypto.EncryptedPrivateKeyInfo
public class EncryptedPrivateKeyInfo
ÀÌ Å¬·¡½º´Â PKCS #8 ·Î Á¤Àǵǰí ÀÖ´Â EncryptedPrivateKeyInfo ÇüÀ» ±¸ÇöÇÕ´Ï´Ù.
±× ASN. 1 Á¤ÀÇ´Â ´ÙÀ½°ú °°½À´Ï´Ù.
EncryptedPrivateKeyInfo ::= SEQUENCE {
encryptionAlgorithm AlgorithmIdentifier,
encryptedData OCTET STRING }
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL }
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 |
| »ý¼ºÀÚ »ó¼¼ |
|---|
public EncryptedPrivateKeyInfo(byte[] encoded)
throws IOException
EncryptedPrivateKeyInfo¸¦ ±¸Ãà (Áï ÇØ¼®)ÇÕ´Ï´Ù.
encoded - ÀÌ °´Ã¼ÀÇ ASN. 1 ÀÎÄÚµù. ¹è¿ÀÇ ³»¿ëÀº ÇâÈÄ º¯°æµÇÁö ¾Ê°Ô º¸È£ÇÏ´Â ¸ñÀûÀ¸·Î Ä«ÇǵȴÙ
NullPointerException - encoded°¡ nullÀÎ °æ¿ì
IOException - ASN. 1 ÀÎÄÚµùÀÇ ÇØ¼®½Ã¿¡ ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
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°¡ Áö¿ø
µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì
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°¡ Áö¿ø
µÇ¾î ÀÖÁö ¾ÊÀº °æ¿ì| ¸Þ¼µåÀÇ »ó¼¼ |
|---|
public String getAlgName()
ÁÖ: »ý¼ºÀÚ À¸·Î ÁöÁ¤µÈ À̸§¿¡ ´ëÀÀÇϴ ǥÁظíÀÌ ÀÖ´Â °æ¿ì´Â ÁöÁ¤µÈ À̸§ ´ë½Å¿¡ Ç¥ÁظíÀÌ ¸®Åϵ˴ϴ٠. ¾ÏÈ£È ¾Ë°í¸®ÁòÀÇ Ç¥ÁØ¸í¿¡ ´ëÇØ¼´Â ¡¸Java ¾ÏÈ£È È®Àå ±â´É ·¹ÆÛ·±½º °¡À̵塹ÀÇ ºÎ·Ï A¸¦ ÂüÁ¶ÇϽʽÿÀ.
public AlgorithmParameters getAlgParameters()
public byte[] getEncryptedData()
public PKCS8EncodedKeySpec getKeySpec(Cipher cipher)
throws InvalidKeySpecException
cipher¸¦ Cipher.DECRYPT_MODE ¶Ç´Â Cipher.UNWRAP_MODE¿¡ ÃʱâÈÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. ÀÌ ¶§, ¾ÏÈ£ÈµÈ µ¥ÀÌÅÍÀÇ »ý¼º¿¡ »ç¿ëµÈ °Í°ú °°Àº Ű¿Í ÆÄ¶ó¹ÌÅ͸¦ »ç¿ëÇÕ´Ï´Ù.
cipher - ¾ÏÈ£ÈµÈ µ¥ÀÌÅÍÀÇ º¹È£È¿¡ »ç¿ëÇÏ´Â ÃʱâÈµÈ ¾ÏÈ£ °´Ã¼
NullPointerException - cipher°¡ nullÀÎ °æ¿ì
InvalidKeySpecException - ÁöÁ¤µÈ ¾ÏÈ£°¡ ¾ÏÈ£ÈµÈ µ¥ÀÌÅÍ¿¡ ºÎÀûÀýÇÑ °æ¿ì, ¶Ç´Â ¾ÏÈ£ÈµÈ µ¥ÀÌÅͰ¡ ¸Á°¡Á® ÀÖ¾î º¹È£È ÇÒ ¼ö ¾ø´Â °æ¿ì
public PKCS8EncodedKeySpec getKeySpec(Key decryptKey)
throws NoSuchAlgorithmException,
InvalidKeyException
decryptKey - ¾ÏÈ£ÈµÈ µ¥ÀÌÅÍÀÇ º¹È£È¿¡ »ç¿ëÇϴ Ű
NullPointerException - decryptKey°¡ nullÀÎ °æ¿ì
NoSuchAlgorithmException - ¾ÏÈ£ÈµÈ µ¥ÀÌÅ͸¦ º¹È£ÈÇϱâ À§ÇÑ ÀûÀýÇÑ ¾ÏÈ£°¡ ¹ß°ßµÇÁö ¾Ê´Â °æ¿ì
InvalidKeyException - ¾ÏÈ£ÈµÈ µ¥ÀÌÅ͸¦ decryptKey·Î
º¹È£È ÇÒ ¼ö ¾ø´Â °æ¿ì. ¶Ç´Â º¹È£È¿¡ ÀÇÇØ ¾òÀ» ¼ö ÀÖ´ø PKCS8KeySpec°¡ À¯È¿ÇÏÁö ¾ÊÀº °æ¿ì
public PKCS8EncodedKeySpec getKeySpec(Key decryptKey,
String providerName)
throws NoSuchProviderException,
NoSuchAlgorithmException,
InvalidKeyException
decryptKey - ¾ÏÈ£ÈµÈ µ¥ÀÌÅÍÀÇ º¹È£È¿¡ »ç¿ëÇϴ ŰproviderName - »ç¿ëÇÏ´Â Cipher
±¸ÇöÀÇ ÇÁ·Î¹ÙÀÌ´õÀÇ À̸§
NullPointerException - decryptKey ¶Ç´Â providerName°¡ nullÀÎ °æ¿ì
NoSuchProviderException - providerName·Î
ÁöÁ¤µÈ ÇÁ·Î¹ÙÀÌ´õ°¡ µî·ÏµÇÁö ¾ÊÀº °æ¿ì
NoSuchAlgorithmException - ¾ÏÈ£ÈµÈ µ¥ÀÌÅ͸¦ º¹È£ÈÇϱâ À§ÇÑ ÀûÀýÇÑ ¾ÏÈ£°¡ ¹ß°ßµÇÁö ¾Ê´Â °æ¿ì
InvalidKeyException - ¾ÏÈ£ÈµÈ µ¥ÀÌÅ͸¦ decryptKey·Î
º¹È£È ÇÒ ¼ö ¾ø´Â °æ¿ì. ¶Ç´Â º¹È£È¿¡ ÀÇÇØ ¾òÀ» ¼ö ÀÖ´ø PKCS8KeySpec°¡ À¯È¿ÇÏÁö ¾ÊÀº °æ¿ì
public PKCS8EncodedKeySpec getKeySpec(Key decryptKey,
Provider provider)
throws NoSuchAlgorithmException,
InvalidKeyException
decryptKey - ¾ÏÈ£ÈµÈ µ¥ÀÌÅÍÀÇ º¹È£È¿¡ »ç¿ëÇϴ Űprovider - »ç¿ëÇÏ´Â Cipher
±¸ÇöÀÇ ÇÁ·Î¹ÙÀÌ´õÀÇ À̸§
NullPointerException - decryptKey ¶Ç´Â provider°¡ nullÀÎ °æ¿ì
NoSuchAlgorithmException - ¾ÏÈ£ÈµÈ µ¥ÀÌÅ͸¦ º¹È£ÈÇϱâ À§ÇÑ ÀûÀýÇÑ ¾ÏÈ£°¡ provider¿¡ ¹ß°ßµÇÁö ¾Ê´Â °æ¿ì
InvalidKeyException - ¾ÏÈ£ÈµÈ µ¥ÀÌÅ͸¦ decryptKey·Î
º¹È£È ÇÒ ¼ö ¾ø´Â °æ¿ì. ¶Ç´Â º¹È£È¿¡ ÀÇÇØ ¾òÀ» ¼ö ÀÖ´ø PKCS8KeySpec°¡ À¯È¿ÇÏÁö ¾ÊÀº °æ¿ì
public byte[] getEncoded()
throws IOException
IOException - ±× ASN. 1 ÀÎÄÚµùÀÇ ±¸Ãà½Ã¿¡ ¿¡·¯°¡ ¹ß»ýÇßÀ» °æ¿ì
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| ÀÌÀü Ŭ·¡½º ´ÙÀ½ Ŭ·¡½º | ÇÁ·¹ÀÓÀ¸·Î ÇÁ·¹ÀÓ ¾øÀÌ | |||||||||
| °³¿ä: NESTED | Çʵå | constructor | ¸Þ¼µå | »ó¼¼: Çʵå | »ý¼ºÀÚ | ¸Þ¼µå | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy µµ ÂüÁ¶ÇϽʽÿÀ.