|
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.cms.SignedAndEnvelopedData
¼¸í ¹× ºñ´ëĪŰ ¾ÏÈ£ ¸Þ½ÃÁö(SignedAndEnvelopedData)¸¦ ó¸®Çϱâ À§ÇÑ Å¬·¡½ºÀÌ´Ù.
¼¸í ¹× ºñ´ëĪŰ ¾ÏÈ£ ¸Þ½ÃÁö´Â ¸Þ½ÃÁöÀÇ ÀÎÁõ, ¹«°á¼º, ±â¹Ð¼ºÀ» À§Çؼ ¸Þ½ÃÁöÀÇ ¼¸í »ý¼º ¹× ´ëĪŰ·Î ¾ÏÈ£ÈÇϰí
´ëĪŰ´Â ¼ö½ÅÀÚÀÇ °ø°³Å°(ÀÎÁõ¼)¸¦ ÀÌ¿ëÇØ¼ ¾ÏÈ£ÈÇÏ¿© ¼ö½ÅÀÚ ¸¸ÀÌ ¸Þ½ÃÁö¸¦ È®ÀÎÇÒ ¼ö ÀÖµµ·Ï ÇÏ´Â º¸¾È ¸Þ½ÃÁö Çü½ÄÀÌ´Ù.
ÇØ´ç Ŭ·¡½º¿¡¼´Â PKCS#7¿¡¼ Á¤ÀÇÇÏ´Â SignedAndEnvelopedData¸¦ Áö¿øÇÑ´Ù.
¼¸í ¹× ºñ´ëĪŰ ¾ÏÈ£ ¸Þ½ÃÁö¿¡ ´ëÇÑ ÀÚ¼¼ÇÑ Á¤º¸´Â
"PKCS#7"¿¡¼ È®ÀÎÇÒ ¼ö ÀÖ´Ù.
¼¸í ¹× ºñ´ëĪŰ ¾ÏÈ£ ¸Þ½ÃÁöÀÇ ASN.1 Æ÷¸ËÀº ´ÙÀ½°ú °°´Ù.
SignedAndEnvelopedData ::= SEQUENCE { version Version, recipientInfos RecipientInfos, digestAlgorithms DigestAlgorithmIdentifiers, encryptedContentInfo EncryptedContentInfo, certificates [0] IMPLICIT ExtendedCertificatesAndCertificates OPTIONAL, crls [1] IMPLICIT CertificateRevocationLists OPTIONAL, signerInfos SignerInfos } ¼¸í ¹× ºñ´ëĪŰ ¾ÏÈ£ ¸Þ½ÃÁö °´Ã¼ »ý¼º ¿¹Á¦ : byte[] data = <¼¸í ¹× ºñ´ëĪŰ ¾ÏÈ£ ¸Þ½ÃÁö Àбâ> SignedAndEnvelopedData signedAndEnvData = SignedAndEnvelopedData.getInstance(data);[Note]
Method Summary | |
byte[] |
decryptAndVerify(X509Certificate myCert,
PKCS8PrivateKeyInfo myPriKeyInfo)
¼ö½ÅÀÚÀÇ ÀÎÁõ¼¿Í °³ÀÎ۸¦ ÀÌ¿ëÇÏ¿© ¸Þ½ÃÁö¸¦ º¹È£ÈÇÏ°í ¼¸í°ªÀ» °ËÁõÇÑ´Ù. |
void |
decryptAndVerify(X509Certificate myCert,
PKCS8PrivateKeyInfo myPriKeyInfo,
java.io.OutputStream os)
¼ö½ÅÀÚÀÇ ÀÎÁõ¼¿Í °³ÀÎ۸¦ ÀÌ¿ëÇÏ¿© ¸Þ½ÃÁö¸¦ º¹È£ÈÇÏ°í ¼¸í°ªÀ» °ËÁõÇÑ´Ù. |
java.util.ArrayList |
getCertificates()
¼¸í ¸Þ½ÃÁö¿¡ Æ÷ÇԵǾîÀÖ´Â ÀÎÁõ¼ ¸ñ·ÏÀ» ȹµæÇÑ´Ù. |
java.lang.String |
getContentEncryptionAlgorithm()
¸Þ½ÃÁö ¾ÏÈ£È ½Ã »ç¿ëÇÑ ¾Ë°í¸®ÁòÀ» È®ÀÎÇÑ´Ù. |
java.lang.String |
getContentType()
¾ÏÈ£ÈµÈ ¸Þ½ÃÁö Á¾·ù¸¦ È®ÀÎÇÑ´Ù. |
java.lang.String[] |
getDigestAlgorihtms()
¼¸í ¸Þ½ÃÁöÀÇ ´ÙÀÌÁ¦½ºÆ® ¾Ë°í¸®Áò ¸ñ·ÏÀ» ȹµæÇÑ´Ù. |
byte[] |
getEncoded()
DER ÀÎÄÚµù µÇ¾îÀÖ´Â ¼¸í ¹× ºñ´ëĪŰ ¾ÏÈ£ ¸Þ½ÃÁö µ¥ÀÌÅ͸¦ ȹµæÇÑ´Ù. |
void |
getEncoded(java.io.OutputStream os)
DER ÀÎÄÚµù µÇ¾îÀÖ´Â ¼¸í ¹× ºñ´ëĪŰ ¾ÏÈ£ ¸Þ½ÃÁö µ¥ÀÌÅ͸¦ ȹµæÇÑ´Ù. |
byte[] |
getEncryptedContent()
¾ÏÈ£ÈµÈ ¸Þ½ÃÁö¸¦ È®ÀÎÇÑ´Ù. |
void |
getEncryptedContent(java.io.OutputStream os)
¾ÏÈ£ÈµÈ ¸Þ½ÃÁö¸¦ È®ÀÎÇÑ´Ù. |
static SignedAndEnvelopedData |
getInstance(byte[] data)
¼¸í ¹× ºñ´ëĪŰ ¾ÏÈ£ ¸Þ½ÃÁö¸¦ ÀÔ·ÂÇÏ¿© SignedAndEnvelopedData °´Ã¼·Î º¯È¯ÇÑ´Ù. |
static SignedAndEnvelopedData |
getInstance(java.lang.Object o)
¼¸í ¹× ºñ´ëĪŰ ¾ÏÈ£ ¸Þ½ÃÁö¸¦ ÀÔ·ÂÇÏ¿© SignedAndEnvelopedData °´Ã¼·Î º¯È¯ÇÑ´Ù. |
java.security.Key |
getKey()
¸Þ½ÃÁö ¾Ïȣȿ¡ »ç¿ëµÇ¾ú´ø ´ëĪ۸¦ ȹµæÇÑ´Ù. |
java.security.spec.AlgorithmParameterSpec |
getParameter()
¸Þ½ÃÁö ¾Ïȣȿ¡ »ç¿ëµÇ¾ú´ø ´ëĪŰ ¾Ë°í¸®ÁòÀÇ ÆÄ¶ó¸ÞÅÍ (IV µî)¸¦ ȹµæÇÑ´Ù. |
java.util.ArrayList |
getRecipientInfos()
¼ö½ÅÀÚ Á¤º¸¸¦ ȹµæÇÑ´Ù. |
X509Certificate |
getSignerCert(SignerIdentifier sid)
¼¸íÀÚ Á¤º¸¿¡ ÀÖ´Â ¼¸íÀÚ ½Äº°ÀÚ¸¦ ÀÌ¿ëÇÏ¿© ÇØ´ç ¼¸íÀÚ¿¡ ´ëÇÑ ÀÎÁõ¼¸¦ ȹµæÇÑ´Ù. |
java.util.ArrayList |
getSignerInfos()
¼¸í ¸Þ½ÃÁö¿¡ ¼¸íÇÑ »ç¶÷µéÀÇ Á¤º¸¸¦ È®ÀÎÇÑ´Ù. |
int |
getVersion()
¼¸í ¹× ºñ´ëĪŰ ¾ÏÈ£ ¸Þ½ÃÁöÀÇ ¹öÀüÀ» È®ÀÎÇÑ´Ù. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static SignedAndEnvelopedData getInstance(byte[] data) throws java.io.IOException
data
- DER ÀÎÄÚµùµÈ ÇüÅÂÀÇ ¼¸í ¹× ºñ´ëĪŰ ¾ÏÈ£ ¸Þ½ÃÁö
java.io.IOException
- µðÄÚµù ½ÇÆÐ½Ã ¹ß»ýpublic static SignedAndEnvelopedData getInstance(java.lang.Object o) throws java.io.IOException
o
- ¼¸í ¹× ºñ´ëĪŰ ¾ÏÈ£ ¸Þ½ÃÁö (DER ÀÎÄÚµùµÈ °ª ¶Ç´Â ASN.1 ÇüÅÂ)
java.io.IOException
- µðÄÚµù ½ÇÆÐ½Ã ¹ß»ýpublic byte[] getEncoded() throws java.io.IOException
java.io.IOException
- ÀÎÄÚµù ½ÇÆÐ ½Ã ¹ß»ýpublic void getEncoded(java.io.OutputStream os) throws java.io.IOException
os
- OutputStream Çü½ÄÀÇ DER ÀÎÄÚµù µÇ¾îÀÖ´Â ¼¸í ¹× ºñ´ëĪŰ ¾ÏÈ£ ¸Þ½ÃÁö
java.io.IOException
- ÀÎÄÚµù ½ÇÆÐ ½Ã ¹ß»ýpublic int getVersion()
public java.util.ArrayList getRecipientInfos() throws java.io.IOException
java.io.IOException
- ¼ö½ÅÀÚ Á¤º¸ µðÄÚµù ½ÇÆÐ ½Ã ¹ß»ýpublic java.lang.String[] getDigestAlgorihtms()
public java.lang.String getContentType()
public java.lang.String getContentEncryptionAlgorithm()
public byte[] getEncryptedContent()
public void getEncryptedContent(java.io.OutputStream os) throws java.io.IOException
os
- Çü½ÄÀÇ ¾ÏÈ£ÈµÈ ¸Þ½ÃÁö
java.io.IOException
- Ãâ·Â ½ÇÆÐ ½Ã ¹ß»ýpublic java.util.ArrayList getCertificates() throws java.io.IOException
java.io.IOException
- ÀÎÁõ¼ µðÄÚµù ½ÇÆÐ ½Ã ¹ß»ýpublic java.util.ArrayList getSignerInfos() throws java.io.IOException
java.io.IOException
- ¼¸íÀÚ Á¤º¸ µðÄÚµù ½ÇÆÐ½Ã ¹ß»ýpublic X509Certificate getSignerCert(SignerIdentifier sid) throws NotExistSignerCertException, ParsingException, java.io.IOException
sid
- ¼¸íÀÚ ½Äº°ÀÚ
NotExistSignerCertException
- ÇØ´ç ¼¸íÀÚ ÀÎÁõ¼°¡ Á¸ÀçÇÏÁö ¾ÊÀ» °æ¿ì¿¡ ¹ß»ý
ParsingException
- ¼¸íÀÚ ½Äº°ÀÚÀÇ À̸§ Á¤º¸¿¡ ó¸®ÇÒ ¼ö ¾ø´Â ¼Ó¼ºÀÌ ÀÖ´Â °æ¿ì¿¡ ¹ß»ý
java.io.IOException
- Á¤º¸ µðÄÚµù ½ÇÆÐ ½Ã ¹ß»ýpublic byte[] decryptAndVerify(X509Certificate myCert, PKCS8PrivateKeyInfo myPriKeyInfo) throws java.io.IOException, java.security.SignatureException, ParsingException, VerifyException, java.security.InvalidKeyException, java.security.spec.InvalidKeySpecException, java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException, NoSuchModeException, NotForUserException, java.security.NoSuchProviderException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException, NotExistSignerCertException, java.security.InvalidAlgorithmParameterException
myCert
- ¼ö½ÅÀÚ ÀÎÁõ¼myPriKeyInfo
- ¼ö½ÅÀÚ °³ÀÎŰ
java.io.IOException
- ÀÎÁõ¼ µðÄÚµù ½ÇÆÐ½Ã ¹ß»ý
ParsingException
- Áö¿øÇÏÁö ¾Ê´Â ¼ö½ÅÀÚ Á¤º¸ ÇüŰ¡ ÀÖ´Â °æ¿ì¿¡ ¹ß»ý
java.security.InvalidKeyException
- ¾Ë°í¸®Áò¿¡ ´ëÇÑ ÀûÇÕÇÑ Å°(À߸øµÈ ÀÎÄÚµù, À߸øµÈ ±æÀÌ, ÃʱâÈ µÇÁö ¾ÊÀ½ µî)°¡ ¾Æ´Ñ °æ¿ì¿¡ ¹ß»ý
java.security.NoSuchAlgorithmException
- Áö¿øÇÏÁö ¾Ê´Â ¾Ë°í¸®ÁòÀÏ °æ¿ì¿¡ ¹ß»ý
javax.crypto.NoSuchPaddingException
- Áö¿øÇÏÁö ¾Ê´Â ÆÐµù Á¾·ùÀÏ °æ¿ì¿¡ ¹ß»ý
NoSuchModeException
- Áö¿øÇÏÁö ¾Ê´Â ¾ÏÈ£ ¸ðµåÀÏ °æ¿ì¿¡ ¹ß»ý
NotForUserException
- ÇØ´ç ¼ö½ÅÀڷΠó¸®ÇÒ ¼ö ¾øÀ» °æ¿ì¿¡ ¹ß»ý
java.security.NoSuchProviderException
- Áö¿øÇÏÁö ¾Ê´Â ¾ÏÈ£ ¸ðµâ Á¦°øÀÚÀÏ °æ¿ì¿¡ ¹ß»ý
javax.crypto.IllegalBlockSizeException
- ÀÔ·Â µ¥ÀÌÅÍÀÇ ±æÀ̰¡ ºí·° ¾Ë°í¸®Áò¿¡ ÀûÇÕÇÏÁö ¾Ê´Â °æ¿ì¿¡ ¹ß»ý
javax.crypto.BadPaddingException
- ÀԷ°ªÀÌ ÁöÁ¤µÈ ÆÐµù ŸÀÔÀ¸·Î ÆÐµù µÇ¾îÀÖÁö ¾ÊÀº °æ¿ì¿¡ ¹ß»ý
java.security.InvalidAlgorithmParameterException
- ¾Ë°í¸®Áò ÆÄ¶ó¸ÞÅͰ¡ ÀûÇÕÇÏÁö ¾ÊÀº °æ¿ì¿¡ ¹ß»ý
java.security.SignatureException
VerifyException
java.security.spec.InvalidKeySpecException
NotExistSignerCertException
public void decryptAndVerify(X509Certificate myCert, PKCS8PrivateKeyInfo myPriKeyInfo, java.io.OutputStream os) throws java.io.IOException, ParsingException, java.security.InvalidKeyException, java.security.NoSuchAlgorithmException, javax.crypto.NoSuchPaddingException, NoSuchModeException, NotForUserException, java.security.NoSuchProviderException, javax.crypto.IllegalBlockSizeException, javax.crypto.BadPaddingException, VerifyException, java.security.SignatureException, NotExistSignerCertException, java.security.spec.InvalidKeySpecException, java.security.InvalidAlgorithmParameterException
myCert
- ¼ö½ÅÀÚ ÀÎÁõ¼myPriKeyInfo
- ¼ö½ÅÀÚ °³ÀÎŰos
- º¹È£ÈµÈ ¸Þ½ÃÁö
java.io.IOException
- ÀÎÁõ¼ µðÄÚµù ½ÇÆÐ½Ã ¹ß»ý
ParsingException
- Áö¿øÇÏÁö ¾Ê´Â ¼ö½ÅÀÚ Á¤º¸ ÇüŰ¡ ÀÖ´Â °æ¿ì¿¡ ¹ß»ý
java.security.InvalidKeyException
- ¾Ë°í¸®Áò¿¡ ´ëÇÑ ÀûÇÕÇÑ Å°(À߸øµÈ ÀÎÄÚµù, À߸øµÈ ±æÀÌ, ÃʱâÈ µÇÁö ¾ÊÀ½ µî)°¡ ¾Æ´Ñ °æ¿ì¿¡ ¹ß»ý
java.security.NoSuchAlgorithmException
- Áö¿øÇÏÁö ¾Ê´Â ¾Ë°í¸®ÁòÀÏ °æ¿ì¿¡ ¹ß»ý
javax.crypto.NoSuchPaddingException
- Áö¿øÇÏÁö ¾Ê´Â ÆÐµù Á¾·ùÀÏ °æ¿ì¿¡ ¹ß»ý
NoSuchModeException
- Áö¿øÇÏÁö ¾Ê´Â ¾ÏÈ£ ¸ðµåÀÏ °æ¿ì¿¡ ¹ß»ý
NotForUserException
- ÇØ´ç ¼ö½ÅÀڷΠó¸®ÇÒ ¼ö ¾øÀ» °æ¿ì¿¡ ¹ß»ý
java.security.NoSuchProviderException
- Áö¿øÇÏÁö ¾Ê´Â ¾ÏÈ£ ¸ðµâ Á¦°øÀÚÀÏ °æ¿ì¿¡ ¹ß»ý
javax.crypto.IllegalBlockSizeException
- ÀÔ·Â µ¥ÀÌÅÍÀÇ ±æÀ̰¡ ºí·° ¾Ë°í¸®Áò¿¡ ÀûÇÕÇÏÁö ¾Ê´Â °æ¿ì¿¡ ¹ß»ý
javax.crypto.BadPaddingException
- ÀԷ°ªÀÌ ÁöÁ¤µÈ ÆÐµù ŸÀÔÀ¸·Î ÆÐµù µÇ¾îÀÖÁö ¾ÊÀº °æ¿ì¿¡ ¹ß»ý
java.security.InvalidAlgorithmParameterException
- ¾Ë°í¸®Áò ÆÄ¶ó¸ÞÅͰ¡ ÀûÇÕÇÏÁö ¾ÊÀº °æ¿ì¿¡ ¹ß»ý
VerifyException
java.security.SignatureException
NotExistSignerCertException
java.security.spec.InvalidKeySpecException
public java.security.Key getKey()
getParameter()
public java.security.spec.AlgorithmParameterSpec getParameter()
getKey()
|
JCaosLib V1.4.4.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |