|
JCaosLib V1.4.4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dreamsecurity.jcaos.pkcs.PKCS8
ºñ¹Ð¹øÈ£ ±â¹ÝÀÇ °³ÀÎŰ ¾ÏÈ£È ¶Ç´Â º¹È£È¸¦ À§ÇÑ Å¬·¡½ºÀÌ´Ù. PKCS#5 Ç¥ÁØÀ» ±â¹ÝÀ¸·Î ÇÏ¿© ¾Ï/º¹È£È
¸¦ ¼öÇàÇÑ´Ù.
°³ÀÎŰ, ¾ÏÈ£ÈµÈ °³ÀÎŰ¿¡ ´ëÇÑ ±¸Á¶´Â Ç¥Áع®¼ "PKCS#8"
¿¡¼ È®ÀÎÇÒ ¼ö ÀÖ´Ù. ¶ÇÇÑ ºñ¹Ð¹øÈ£¸¦ ±â¹ÝÀ¸·Î ÇÑ ¾Ï/º¹È£È¿¡ ´ëÇÑ Ç¥Áع®¼ "PKCS#5"
¿¡ ±â¼úµÇ¾îÀÖ´Ù.
°³ÀÎŰ Á¤º¸¿Í ¾ÏÈ£ÈµÈ °³ÀÎŰ Á¤º¸ÀÇ ASN.1 Æ÷¸ËÀº ´ÙÀ½°ú °°´Ù.
PrivateKeyInfo ::= SEQUENCE { version Version, privateKeyAlgorithm AlgorithmIdentifier {{PrivateKeyAlgorithms}}, privateKey PrivateKey, attributes [0] Attributes OPTIONAL } EncryptedPrivateKeyInfo ::= SEQUENCE { encryptionAlgorithm AlgorithmIdentifier {{KeyEncryptionAlgorithms}}, encryptedData EncryptedData }
Constructor Summary | |
PKCS8(java.lang.String password)
°³ÀÎŰ ¾Ï/º¹È£È¿¡ »ç¿ëÇÒ ºñ¹Ð¹øÈ£¸¦ ¼³Á¤ÇÏ¿© PKCS8 Ŭ·¡½º¸¦ ÃʱâÈ ÇÑ´Ù. |
Method Summary | |
PKCS8PrivateKeyInfo |
decrypt(byte[] encPriKey)
¾ÏÈ£ÈµÈ °³ÀÎ۸¦ º¹È£ÈÇÑ´Ù. |
byte[] |
encrypt(PKCS8PrivateKeyInfo priKeyInfo)
°³ÀÎ۸¦ ¾ÏÈ£ÈÇÑ´Ù. |
void |
setIterationCount(int cnt)
۸¦ À¯µµÇÒ¶§ »ç¿ëµÇ´Â interation count °ªÀ» ÁöÁ¤ÇÑ´Ù. |
void |
setPBES1Algorithm(java.lang.String pbes)
PKCS#5 V1.5 ¹æ¹ýÀ» ÀÌ¿ëÇÏ¿© °³ÀÎ۸¦ ¾ÏÈ£ÈÇÑ´Ù. |
void |
setPBES2Algorithm(java.lang.String pbes)
PKCS#5 V2.0 ¹æ¹ýÀ» ÀÌ¿ëÇÏ¿© °³ÀÎ۸¦ ¾ÏÈ£ÈÇÑ´Ù. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PKCS8(java.lang.String password)
password
- ºñ¹Ð¹øÈ£Method Detail |
public void setPBES1Algorithm(java.lang.String pbes)
pbes
- ´ëĪŰ ¾Ë°í¸®Áòpublic void setPBES2Algorithm(java.lang.String pbes)
pbes
- ´ëĪŰ ¾Ë°í¸®Áòpublic void setIterationCount(int cnt)
cnt
- interation countpublic byte[] encrypt(PKCS8PrivateKeyInfo priKeyInfo) throws java.io.IOException, AlgorithmException, java.security.NoSuchAlgorithmException, NoSuchModeException, javax.crypto.NoSuchPaddingException, java.security.NoSuchProviderException, java.security.InvalidKeyException, javax.crypto.BadPaddingException, javax.crypto.IllegalBlockSizeException, java.security.InvalidAlgorithmParameterException
priKeyInfo
- °³ÀÎŰ
java.io.IOException
- °³ÀÎŰ µðÄÚµù ½ÇÆÐ ½Ã ¹ß»ý
java.security.NoSuchAlgorithmException
- Áö¿øÇÏÁö ¾Ê´Â ¾Ë°í¸®ÁòÀÏ °æ¿ì¿¡ ¹ß»ý
javax.crypto.NoSuchPaddingException
- Áö¿øÇÏÁö ¾Ê´Â ÆÐµù Á¾·ùÀÏ °æ¿ì¿¡ ¹ß»ý
NoSuchModeException
- Áö¿øÇÏÁö ¾Ê´Â ¾ÏÈ£ ¸ðµåÀÏ °æ¿ì¿¡ ¹ß»ý
java.security.NoSuchProviderException
- Áö¿øÇÏÁö ¾Ê´Â ¾ÏÈ£ ¸ðµâ Á¦°øÀÚÀÏ °æ¿ì¿¡ ¹ß»ý
java.security.InvalidKeyException
- ¾Ë°í¸®Áò¿¡ ´ëÇÑ ÀûÇÕÇÑ Å°(À߸øµÈ ÀÎÄÚµù, À߸øµÈ ±æÀÌ, ÃʱâÈ µÇÁö ¾ÊÀ½ µî)°¡ ¾Æ´Ñ °æ¿ì¿¡ ¹ß»ý
javax.crypto.IllegalBlockSizeException
- ÀÔ·Â µ¥ÀÌÅÍÀÇ ±æÀ̰¡ ºí·° ¾Ë°í¸®Áò¿¡ ÀûÇÕÇÏÁö ¾Ê´Â °æ¿ì¿¡ ¹ß»ý
javax.crypto.BadPaddingException
- ÀԷ°ªÀÌ ÁöÁ¤µÈ ÆÐµù ŸÀÔÀ¸·Î ÆÐµù µÇ¾îÀÖÁö ¾ÊÀº °æ¿ì¿¡ ¹ß»ý
java.security.InvalidAlgorithmParameterException
- ¾Ë°í¸®Áò ÆÄ¶ó¸ÞÅͰ¡ ÀûÇÕÇÏÁö ¾ÊÀº °æ¿ì¿¡ ¹ß»ý
AlgorithmException
public PKCS8PrivateKeyInfo decrypt(byte[] encPriKey) throws java.io.IOException, ParsingException, AlgorithmException, java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException, java.security.NoSuchProviderException, NoSuchModeException, java.security.InvalidKeyException, ConfirmPasswordException, java.security.InvalidAlgorithmParameterException
encPriKey
- ¾ÏÈ£ÈµÈ °³ÀÎŰ
ConfirmPasswordException
- °³ÀÎŰ ºñ¹Ð¹øÈ£°¡ Ʋ¸° °æ¿ì¿¡ ¹ß»ý
java.io.IOException
- ¾ÏÈ£ÈµÈ °³ÀÎŰ µðÄÚµù ½ÇÆÐ ½Ã ¹ß»ý
ParsingException
- Áö¿øÇÏÁö ¾Ê´Â ¸Þ½ÃÁö °ªÀÌ Á¸ÀçÇÒ¶§ ¹ß»ý
java.security.NoSuchAlgorithmException
- Áö¿øÇÏÁö ¾Ê´Â ¾Ë°í¸®ÁòÀÏ °æ¿ì¿¡ ¹ß»ý
javax.crypto.NoSuchPaddingException
- Áö¿øÇÏÁö ¾Ê´Â ÆÐµù Á¾·ùÀÏ °æ¿ì¿¡ ¹ß»ý
NoSuchModeException
- Áö¿øÇÏÁö ¾Ê´Â ¾ÏÈ£ ¸ðµåÀÏ °æ¿ì¿¡ ¹ß»ý
java.security.NoSuchProviderException
- Áö¿øÇÏÁö ¾Ê´Â ¾ÏÈ£ ¸ðµâ Á¦°øÀÚÀÏ °æ¿ì¿¡ ¹ß»ý
java.security.InvalidKeyException
- ¾Ë°í¸®Áò¿¡ ´ëÇÑ ÀûÇÕÇÑ Å°(À߸øµÈ ÀÎÄÚµù, À߸øµÈ ±æÀÌ, ÃʱâÈ µÇÁö ¾ÊÀ½ µî)°¡ ¾Æ´Ñ °æ¿ì¿¡ ¹ß»ý
java.security.InvalidAlgorithmParameterException
- ¾Ë°í¸®Áò ÆÄ¶ó¸ÞÅͰ¡ ÀûÇÕÇÏÁö ¾ÊÀº °æ¿ì¿¡ ¹ß»ý
AlgorithmException
|
JCaosLib V1.4.4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |