xecure.expcms
Class EnvelopedData

java.lang.Object
  |
  +--xecure.expcms.EnvelopedData

public class EnvelopedData
extends java.lang.Object

ÀÌ Å¬·¡½º´Â CMS ÀÇ Envelope Data ¸¦ »ý¼ºÇϰí ÇØ¼®ÇÑ´Ù.


Field Summary
static int CONTENT_DATA
           
static int CONTENT_DATA_OCTETSTR
           
static int CONTENT_ENVELOPED
           
static int CONTENT_SIGNED
           
static int DES_CBC
           
static int DES_EDE3_CBC
           
static int SEED_CBC
           
 
Constructor Summary
EnvelopedData(XecureExpConfig config)
          EnvelopedData Constructor
 
Method Summary
 byte[] deEnvelopedData(byte[] recipient_cert_pem, byte[] recipient_key, byte[] key_pwd, java.lang.String enveloped)
          Enveloped Data¸¦ DeEnvelopeÇÑ´Ù.
 byte[] deEnvelopedData(java.security.cert.X509Certificate recipient_cert, byte[] recipient_key, byte[] key_pwd, java.lang.String enveloped)
          Enveloped Data¸¦ DeEnvelopeÇÑ´Ù.
 java.lang.String envelopedData(byte[] recipient_cert_pem, byte[] plain, int encryptionAlgorithm, int plainContentType)
          Enveloped Data¸¦ »ý¼ºÇÑ´Ù.
 java.lang.String envelopedData(java.security.cert.X509Certificate recipient_cert, byte[] plain, int encryptionAlgorithm, int plainContentType)
          Enveloped Data¸¦ »ý¼ºÇÑ´Ù.
 int getDecodedContentType()
           Deprecated DecodeÇÑ µ¥ÀÌÅÍÀÇ Å¸ÀÔÀ» ¸®ÅÏÇÑ´Ù.
 int getDecodedEncryptionAlgorithm()
          Envelope¿¡ »ç¿ëµÈ ¾Ë°í¸®ÁòÀ» ¸®ÅÏÇÑ´Ù.
 int getLastError()
          ¿¡·¯ Äڵ带 ¸®ÅÏÇÑ´Ù.
 java.lang.String getLastErrorMsg()
          ¿¡·¯ ¸Þ½ÃÁö¸¦ ¸®ÅÏÇÑ´Ù.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DES_CBC

public static int DES_CBC

DES_EDE3_CBC

public static int DES_EDE3_CBC

SEED_CBC

public static int SEED_CBC

CONTENT_DATA

public static int CONTENT_DATA

CONTENT_DATA_OCTETSTR

public static int CONTENT_DATA_OCTETSTR

CONTENT_SIGNED

public static int CONTENT_SIGNED

CONTENT_ENVELOPED

public static int CONTENT_ENVELOPED
Constructor Detail

EnvelopedData

public EnvelopedData(XecureExpConfig config)
EnvelopedData Constructor
Parameters:
config - xecure.exp.XecureExpConfig
Method Detail

envelopedData

public java.lang.String envelopedData(java.security.cert.X509Certificate recipient_cert,
                                      byte[] plain,
                                      int encryptionAlgorithm,
                                      int plainContentType)
                               throws java.security.cert.CertificateEncodingException
Enveloped Data¸¦ »ý¼ºÇÑ´Ù.
Parameters:
recipient_cert - EnvelopeÇϴµ¥ »ç¿ëµÉ ¼ö½ÅÀÚ ÀÎÁõ¼­.
plain - EnvelopeÇϰíÀÚÇÏ´Â µ¥ÀÌŸ.
encryptionAlgorithm - ¼­¸í ¾Ë°í¸®Áò EnvelopedData.DES_CBC, EnvelopedData.DES_EDE3_CBC,
EnvelopedData.SEED_CBC
plainContentType - µ¥ÀÌÅÍ Çü½Ä EnvelopedData.CONTENT_DATA,
EnvelopedData.CONTENT_DATA_OCTETSTR,
EnvelopedData.CONTENT_SIGNED,
EnvelopedData.CONTENT_ENVELOPED

envelopedData

public java.lang.String envelopedData(byte[] recipient_cert_pem,
                                      byte[] plain,
                                      int encryptionAlgorithm,
                                      int plainContentType)
                               throws java.security.cert.CertificateEncodingException
Enveloped Data¸¦ »ý¼ºÇÑ´Ù.
Parameters:
recipient_cert_pem - EnvelopeÇϴµ¥ »ç¿ëµÉ ¼ö½ÅÀÚ ÀÎÁõ¼­.(pem type)
plain - EnvelopeÇϰíÀÚÇÏ´Â µ¥ÀÌŸ.
encryptionAlgorithm - ¼­¸í ¾Ë°í¸®Áò EnvelopedData.DES_CBC, EnvelopedData.DES_EDE3_CBC,
EnvelopedData.SEED_CBC
plainContentType - µ¥ÀÌÅÍ Çü½Ä EnvelopedData.CONTENT_DATA,
EnvelopedData.CONTENT_DATA_OCTETSTR,
EnvelopedData.CONTENT_SIGNED,
EnvelopedData.CONTENT_ENVELOPED

deEnvelopedData

public byte[] deEnvelopedData(java.security.cert.X509Certificate recipient_cert,
                              byte[] recipient_key,
                              byte[] key_pwd,
                              java.lang.String enveloped)
                       throws java.security.cert.CertificateEncodingException
Enveloped Data¸¦ DeEnvelopeÇÑ´Ù.
Parameters:
recipient_cert - º¹È£Çϴµ¥ »ç¿ëµÉ ¼ö½ÅÀÚ ÀÎÁõ¼­.
recipient_key - º¹È£Çϴµ¥ »ç¿ëµÉ ¼ö½ÅÀÚ °³ÀÎŰ.
key_pwd - º¹È£Çϴµ¥ »ç¿ëµÉ ¼ö½ÅÀÚ °³ÀÎŰ ÆÐ½º¿öµå.
enveloped - DeEnvelopeÇϰíÀÚÇÏ´Â Envelopedµ¥ÀÌŸ.

deEnvelopedData

public byte[] deEnvelopedData(byte[] recipient_cert_pem,
                              byte[] recipient_key,
                              byte[] key_pwd,
                              java.lang.String enveloped)
                       throws java.security.cert.CertificateEncodingException
Enveloped Data¸¦ DeEnvelopeÇÑ´Ù.
Parameters:
recipient_cert_pem - º¹È£Çϴµ¥ »ç¿ëµÉ ¼ö½ÅÀÚ ÀÎÁõ¼­.
recipient_key - º¹È£Çϴµ¥ »ç¿ëµÉ ¼ö½ÅÀÚ °³ÀÎŰ.
key_pwd - º¹È£Çϴµ¥ »ç¿ëµÉ ¼ö½ÅÀÚ °³ÀÎŰ ÆÐ½º¿öµå.
enveloped - DeEnvelopeÇϰíÀÚÇÏ´Â Envelopedµ¥ÀÌŸ.

getDecodedEncryptionAlgorithm

public int getDecodedEncryptionAlgorithm()
Envelope¿¡ »ç¿ëµÈ ¾Ë°í¸®ÁòÀ» ¸®ÅÏÇÑ´Ù.
1 : DES_CBC , 2 : DES_CBC 8 : SEED_CBC
Returns:
encryption_algorithm

getDecodedContentType

public int getDecodedContentType()
Deprecated DecodeÇÑ µ¥ÀÌÅÍÀÇ Å¸ÀÔÀ» ¸®ÅÏÇÑ´Ù.
Returns:
content_type

getLastError

public int getLastError()
¿¡·¯ Äڵ带 ¸®ÅÏÇÑ´Ù.
errno : -37331 BAD_SIGNED_DATA (À߸øµÈ Signed Data )
-37332 BAD_ENVELOPED_DATA (À߸øµÈ Enveloped Data )
-37341 BAD_CERT (À߸øµÈ ÀÎÁõ¼­)
-37361 NO_CERT (ÀÎÁõ¼­°¡ attach µÇÁö ¾Ê¾ÒÀ½)
-37430 INVALID_PASSWORD (°³ÀÎŰ ÆÐ½º¿öµå°¡ À߸øµÊ )
-37422 BAD_ENCPRIVKEYINFO (encrypted key º¹È£È­ ¿À·ù)
±âŸ
Returns:
error number

getLastErrorMsg

public java.lang.String getLastErrorMsg()
¿¡·¯ ¸Þ½ÃÁö¸¦ ¸®ÅÏÇÑ´Ù.
Returns:
error message