xecure.crypto
Class FileMultiSignVerifier

java.lang.Object
  |
  +--xecure.crypto.FileMultiSignVerifier

public class FileMultiSignVerifier
extends java.lang.Object

ÀÌ Å¬·¡½º´Â ÀüÀÚ¼­¸íµÈ È­ÀÏÀ» ÇØ¼®ÇÏ°í °ËÁõÇÑ´Ù.

Since:
6.0 v100

Constructor Summary
FileMultiSignVerifier(XecureConfig config, byte[] splitedSign, java.lang.String contentFileName, byte[][] certDer)
          FileMultiSignVerifier object ¸¦ »ý¼ºÇÏ°í ºÐ¸®µÈ È­Àϼ­¸í¿¡ ´ëÇÑ ÇØ¼®¹× °ËÁõÀ» ¼öÇàÇÑ´Ù.
FileMultiSignVerifier(XecureConfig config, byte[] splitedSign, java.lang.String contentFileName, java.lang.String[] certPem)
          FileMultiSignVerifier object ¸¦ »ý¼ºÇÏ°í ºÐ¸®µÈ È­Àϼ­¸í¿¡ ´ëÇÑ ÇØ¼®¹× °ËÁõÀ» ¼öÇàÇÑ´Ù.
FileMultiSignVerifier(XecureConfig config, java.lang.String fileName)
          FileMultiSignVerifier object ¸¦ »ý¼ºÇÏ°í µ¿½Ã¿¡ ÀüÀÚ¼­¸íµÈ È­ÀÏ¿¡ ´ëÇÑ ÇØ¼®¹× °ËÁõÀ» ¼öÇàÇÑ´Ù.
ÀÎÁõ¼­ °ËÁõÀº ¼öÇàÇÏÁö ¾ÊÀ¸¹Ç·Î º°µµ·Î °ËÁõÇØ¾ß ÇÑ´Ù.
getLastError() °¡ 0 ÀÌ ¾Æ´Ñ °ªÀ» ¸®ÅÏÇÒ °æ¿ì¿¡´Â ¼­¸íµÈ ¸Þ½ÃÁö¿¡ ¹®Á¦°¡ ÀÖ´Â °æ¿ìÀÌ´Ù.
getLastError() °¡ 0 À» ¸®ÅÏÇÒ °æ¿ì ¼­¸íÀÚ ÀÎÁõ¼­, ¼­¸í¿¡ »ç¿ëµÈ ¹®¼­ ¸¦ ¾òÀ» ¼ö ÀÖ´Ù.
 
Method Summary
 int getLastError()
          ÀüÀÚ¼­¸í °ËÁõ½Ã ¿¡·¯°¡ ¹ß»ýÇÒ °æ¿ì ¿¡·¯Äڵ尡 ¸®ÅϵȴÙ.
 java.lang.String getLastErrorMsg()
          ÀüÀÚ¼­¸í °ËÁõ½Ã ¿¡·¯°¡ ¹ß»ýÇÑ °æ¿ì ¿¡·¯ ¸Þ½ÃÁö¸¦ ¾òÀ» ¼ö ÀÖ´Ù.
 int getNumberOfSigner()
          ¸ÖƼ¼­¸íÀÚÀÇ ¼ö¸¦ ¸®ÅÏÇÑ´Ù.
 java.util.Date getOrgFileDate()
          ¼­¸íµÈ È­ÀÏÀÇ ½Ã°£ Á¤º¸¸¦ ¸®ÅÏÇÑ´Ù.
 long getOrgFileLength()
          ¼­¸íµÈ È­ÀÏÀÇ ¿ø½Ã È­ÀÏ ±æÀ̸¦ ¸®ÅÏÇÑ´Ù.
 java.lang.String getOrgFileName()
          ¼­¸íµÈ È­ÀÏÀÇ ¿ø½Ã È­ÀϸíÀ» ¸®ÅÏÇÑ´Ù.
 Certificate getSignerCertificate(int index)
          ¸ÖƼ¼­¸íÀÚÀÇ ÀÎÁõ¼­¸¦ ¸®ÅÏÇÑ´Ù.
 java.lang.String getSignerCertificateS(int index)
          ¸ÖƼ¼­¸íÀÚÀÇ ÀÎÁõ¼­¸¦ PEM Çü½ÄÀÇ ½ºÆ®¸µÀ¸·Î ¸®ÅÏÇÑ´Ù.
 java.lang.String getSignerSubject(int index)
          ¸ÖƼ¼­¸íÀÚÀÇ subject DN À» ¸®ÅÏÇÑ´Ù.
 java.lang.String getSignTimeMsg(int index)
          ¸ÖƼ¼­¸íÀÇ ¼­¸í ½Ã°£À» ¸®ÅÏÇÑ´Ù.
 java.lang.String getVerifiedMsg_Text()
          ¼­¸íµÇ±âÀü Text ¹®¼­ ¿øº»À» ¸®ÅÏÇÑ´Ù.
 byte[] getVerifiedMsg()
          ¼­¸íµÇ±âÀü Binary ¹®¼­ ¿øº»À» ¸®ÅÏÇÑ´Ù.
 int read(byte[] buf)
          ¼­¸íµÈ È­ÀÏÀÇ ³»¿ëÀ» Àд´Ù.
 int read(byte[] buf, int off, int len)
          ¼­¸íµÈ È­ÀÏÀÇ ³»¿ëÀ» Àд´Ù.
 void resetRead()
          ¼­¸íµÈ È­ÀÏÀ» Àбâ À§ÇÑ ÃʱâÈ­ ÀÛ¾÷À» ¼öÇàÇÑ´Ù.
óÀ½ºÎÅÍ ´Ù½Ã Àд °æ¿ì »ç¿ëÇÒ ¼ö ÀÖ´Ù.
 boolean saveFile(boolean overwrite)
          ¼­¸íµÈ È­ÀÏÀÇ ³»¿ëÀ» ÀúÀåÇÑ´Ù.
 boolean saveFile(java.lang.String fileName, boolean overwrite)
          ¼­¸íµÈ È­ÀÏÀÇ ³»¿ëÀ» ÀúÀåÇÑ´Ù.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileMultiSignVerifier

public FileMultiSignVerifier(XecureConfig config,
                             byte[] splitedSign,
                             java.lang.String contentFileName,
                             byte[][] certDer)
FileMultiSignVerifier object ¸¦ »ý¼ºÇÏ°í ºÐ¸®µÈ È­Àϼ­¸í¿¡ ´ëÇÑ ÇØ¼®¹× °ËÁõÀ» ¼öÇàÇÑ´Ù.
Parameters:
config - XecureConfig object
splitedSign - ºÐ¸®µÈ ¼ø¼ö ¼­¸í¹® (DER encoded)
contentFileName - ¿øº»È­ÀÏÀÇ °æ·Î¸í
certDer - º´ÇÕÇÒ ÀÎÁõ¼­ (DER), º¹¼ö°³ÀÇ ÀÎÁõ¼­¸¦ º´ÇÕÇÒ ¼ö ÀÖµµ·Ï byte[][] ÀÔ·Â.
    ex) byte[][] certs=new byte[2][]; certs[0]=cert1; certs[1]=cert2;
Since:
6.0 v130
See Also:
getLastError(), getLastErrorMsg()

FileMultiSignVerifier

public FileMultiSignVerifier(XecureConfig config,
                             byte[] splitedSign,
                             java.lang.String contentFileName,
                             java.lang.String[] certPem)
FileMultiSignVerifier object ¸¦ »ý¼ºÇÏ°í ºÐ¸®µÈ È­Àϼ­¸í¿¡ ´ëÇÑ ÇØ¼®¹× °ËÁõÀ» ¼öÇàÇÑ´Ù.
Parameters:
config - XecureConfig object
splitedSign - ºÐ¸®µÈ ¼ø¼ö ¼­¸í¹® (DER encoded)
contentFileName - ¿øº»È­ÀÏÀÇ °æ·Î¸í
certPem - º´ÇÕÇÒ ÀÎÁõ¼­ (PEM), º¹¼ö°³ÀÇ ÀÎÁõ¼­¸¦ º´ÇÕÇÒ ¼ö ÀÖµµ·Ï String[] ÀÔ·Â.
    ex) String[] certs=new String[2]; certs[0]=cert1; certs[1]=cert2;
Since:
6.0 v130
See Also:
getLastError(), getLastErrorMsg()

FileMultiSignVerifier

public FileMultiSignVerifier(XecureConfig config,
                             java.lang.String fileName)
FileMultiSignVerifier object ¸¦ »ý¼ºÇÏ°í µ¿½Ã¿¡ ÀüÀÚ¼­¸íµÈ È­ÀÏ¿¡ ´ëÇÑ ÇØ¼®¹× °ËÁõÀ» ¼öÇàÇÑ´Ù.
ÀÎÁõ¼­ °ËÁõÀº ¼öÇàÇÏÁö ¾ÊÀ¸¹Ç·Î º°µµ·Î °ËÁõÇØ¾ß ÇÑ´Ù.
getLastError() °¡ 0 ÀÌ ¾Æ´Ñ °ªÀ» ¸®ÅÏÇÒ °æ¿ì¿¡´Â ¼­¸íµÈ ¸Þ½ÃÁö¿¡ ¹®Á¦°¡ ÀÖ´Â °æ¿ìÀÌ´Ù.
getLastError() °¡ 0 À» ¸®ÅÏÇÒ °æ¿ì ¼­¸íÀÚ ÀÎÁõ¼­, ¼­¸í¿¡ »ç¿ëµÈ ¹®¼­ ¸¦ ¾òÀ» ¼ö ÀÖ´Ù.
Parameters:
config - XecureConfig object
fileName - ÀüÀÚ¼­¸íµÈ È­ÀÏ °æ·Î¸í
Since:
6.0 v100
Method Detail

getLastError

public int getLastError()
ÀüÀÚ¼­¸í °ËÁõ½Ã ¿¡·¯°¡ ¹ß»ýÇÒ °æ¿ì ¿¡·¯Äڵ尡 ¸®ÅϵȴÙ.
-1001 : Library Initialize error
-1002 : Signed Message Parsing Error
-1003 : ¼­¸íÀÚ ÀÎÁõ¼­°¡ Æó±âµÇ¾î ÀÖÀ½
-1004 : ÀÎÁõ¼­ °ËÁõ ¿¡·¯
-1005 : ¼­¸íÀÚ ÀÎÁõ¼­ À¯È¿±â°£ ¸¸·á
-1006 : ÀÎÁõ±â°ü ÀÎÁõ¼­ À¯È¿±â°£ ¸¸·á
-1007 : À߸øµÈ ÀÎÁõ¼­
-1008 : ¼­¸íÀÚ ÀÎÁõ¼­ È¿·ÂÁ¤Áö »óÅÂ
-1009 : ¾Ë ¼ö ¾ø´Â ¿¡·¯
-1201 : °øÀεî·Ï±â°ü ¿¬°á ½ÇÆÐ
-1202 : °øÀεî·Ï±â°ü ¸Þ¸ð¸® ¿¡·¯
-1203 : °øÀεî·Ï±â°ü ó¸® ½ÇÆÐ
-2001 : »ç¼³µî·Ï±â°ü È£½ºÆ®¸í ¿¡·¯
-2002 : »ç¼³µî·Ï±â°ü ¼ÒÄÏ »ý¼º ½ÇÆÐ
-2003 : »ç¼³µî·Ï±â°ü ¼ÒÄÏ ¿¬°á ½ÇÆÐ
-2004 : »ç¼³µî·Ï±â°ü ¼ÒÄÏ µ¥ÀÌŸ ÀÐ±â ½ÇÆÐ
-2005 : »ç¼³µî·Ï±â°ü ¼ÒÄÏ µ¥ÀÌŸ ¾²±â ½ÇÆÐ
-2006 : »ç¼³µî·Ï±â°ü RSA ¾ÏÈ£ ½ÇÆÐ
-2007 : »ç¼³µî·Ï±â°ü RSA º¹È£ ½ÇÆÐ
-2008 : »ç¼³µî·Ï±â°ü ³»ºÎ ¿À·ù
-2009 : »ç¼³µî·Ï±â°ü À߸øµÈ ¸Þ½ÃÁö
-2011 : »ç¼³µî·Ï±â°ü ¼­¹ö ÀÎÁõ¼­ Àб⠿À·ù
-2012 : »ç¼³µî·Ï±â°ü ¼­¹ö °³ÀÎŰ Àб⠿À·ù
-2013 : »ç¼³µî·Ï±â°ü ÀÎÁõ¼­ Àб⠿À·ù
-2014 : »ç¼³µî·Ï±â°ü ¼­¹ö ÀÎÁõ¼­ Çü½Ä ¿À·ù
-2015 : »ç¼³µî·Ï±â°ü ¼­¹ö °³ÀÎŰ Àб⠿À·ù
-2016 : »ç¼³µî·Ï±â°ü ÀÎÁõ¼­ Àб⠿À·ù
-2017 : »ç¼³µî·Ï±â°ü ÇÁ·ÎÅäÄÝ ¿À·ù
-2018 : »ç¼³µî·Ï±â°ü Àü´Þ Àμö ºÎÁ· ¿À·ù
-2019 : »ç¼³µî·Ï±â°ü ÀÎÁõ¿ä±¸¼­ »ý¼º ¿À·ù
-2020 : »ç¼³µî·Ï±â°ü À߸øµÈ ÀÎÁõ±â°ü ¸Þ½ÃÁö ¿À·ù
-2021 : »ç¼³µî·Ï±â°ü ÀÎÁõ ¼­ºñ½º ¿äû ½ÇÆÐ
-2025 : »ç¼³µî·Ï±â°ü ¸Þ½ÃÁö ¾ÏÈ£ ½ÇÆÐ
-2026 : »ç¼³µî·Ï±â°ü ¸Þ½ÃÁö º¹È£ ½ÇÆÐ
-3010 : ¼­¹ö Xecure ¼³Á¤ ÆÄÀÏ ¿À·ù
Returns:
error code
Since:
6.0 v100

getLastErrorMsg

public java.lang.String getLastErrorMsg()
ÀüÀÚ¼­¸í °ËÁõ½Ã ¿¡·¯°¡ ¹ß»ýÇÑ °æ¿ì ¿¡·¯ ¸Þ½ÃÁö¸¦ ¾òÀ» ¼ö ÀÖ´Ù.
Returns:
error message
Since:
6.0 v100

getSignerCertificate

public Certificate getSignerCertificate(int index)
¸ÖƼ¼­¸íÀÚÀÇ ÀÎÁõ¼­¸¦ ¸®ÅÏÇÑ´Ù.
Parameters:
index - ¼­¸íÀÚÀÇ À妽º¸¦ ³ªÅ¸³¿ (0ºÎÅÍ ½ÃÀÛ)
Returns:
signer Certificate object
Since:
6.0 v100

getSignerCertificateS

public java.lang.String getSignerCertificateS(int index)
¸ÖƼ¼­¸íÀÚÀÇ ÀÎÁõ¼­¸¦ PEM Çü½ÄÀÇ ½ºÆ®¸µÀ¸·Î ¸®ÅÏÇÑ´Ù.
Parameters:
index - ¼­¸íÀÚÀÇ À妽º¸¦ ³ªÅ¸³¿ (0ºÎÅÍ ½ÃÀÛ)
Returns:
signer PEM
Since:
6.0 v100

getSignerSubject

public java.lang.String getSignerSubject(int index)
¸ÖƼ¼­¸íÀÚÀÇ subject DN À» ¸®ÅÏÇÑ´Ù.
Parameters:
index - ¼­¸íÀÚÀÇ À妽º¸¦ ³ªÅ¸³¿ (0ºÎÅÍ ½ÃÀÛ)
Returns:
signer Subject DN
Since:
6.0 v100

getSignTimeMsg

public java.lang.String getSignTimeMsg(int index)
¸ÖƼ¼­¸íÀÇ ¼­¸í ½Ã°£À» ¸®ÅÏÇÑ´Ù.
Parameters:
index - ¼­¸íÀÚÀÇ À妽º¸¦ ³ªÅ¸³¿ (0ºÎÅÍ ½ÃÀÛ)
Returns:
signer signedAttr_signTime
Since:
6.0 v110

getNumberOfSigner

public int getNumberOfSigner()
¸ÖƼ¼­¸íÀÚÀÇ ¼ö¸¦ ¸®ÅÏÇÑ´Ù.
Returns:
nSigner
Since:
6.0 v100

getVerifiedMsg

public byte[] getVerifiedMsg()
¼­¸íµÇ±âÀü Binary ¹®¼­ ¿øº»À» ¸®ÅÏÇÑ´Ù.
Returns:
verified message
Since:
6.0 v100

getVerifiedMsg_Text

public java.lang.String getVerifiedMsg_Text()
¼­¸íµÇ±âÀü Text ¹®¼­ ¿øº»À» ¸®ÅÏÇÑ´Ù. ÇѱÛÀÌ µé¾îÀÖ´Â ÅØ½ºÆ® ¹®¼­ÀÇ °æ¿ì ¹Ýµå½Ã ÀÌ ÇÔ¼ö¸¦ È£ÃâÇØ¾ß ÇÑ´Ù.
Returns:
verified message text
Since:
6.0 v100

getOrgFileName

public java.lang.String getOrgFileName()
                                throws java.io.IOException
¼­¸íµÈ È­ÀÏÀÇ ¿ø½Ã È­ÀϸíÀ» ¸®ÅÏÇÑ´Ù.
Returns:
È­Àϸí, ¿¡·¯½Ã null
Since:
6.0 v120

getOrgFileLength

public long getOrgFileLength()
                      throws java.io.IOException
¼­¸íµÈ È­ÀÏÀÇ ¿ø½Ã È­ÀÏ ±æÀ̸¦ ¸®ÅÏÇÑ´Ù.
Returns:
È­Àϸí , ¿¡·¯½Ã -1
Since:
6.0 v120

getOrgFileDate

public java.util.Date getOrgFileDate()
                              throws java.io.IOException
¼­¸íµÈ È­ÀÏÀÇ ½Ã°£ Á¤º¸¸¦ ¸®ÅÏÇÑ´Ù.
Returns:
È­ÀÏ ½Ã°£
Since:
6.0 v120

read

public int read(byte[] buf)
         throws java.io.IOException
¼­¸íµÈ È­ÀÏÀÇ ³»¿ëÀ» Àд´Ù.
Parameters:
buf - : the buffer into which the data is read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the file has been reached.
Throws:
java.io.IOException -  
Since:
6.0 v120

read

public int read(byte[] buf,
                int off,
                int len)
         throws java.io.IOException
¼­¸íµÈ È­ÀÏÀÇ ³»¿ëÀ» Àд´Ù.
Parameters:
buf - : the buffer into which the data is read.
off - : the start offset of the data.
len - : the maximum number of bytes read.
Returns:
the total number of bytes read into the buffer, or -1 if there is no more data because the end of the file has been reached.
Throws:
java.io.IOException -  
Since:
6.0 v120

saveFile

public boolean saveFile(boolean overwrite)
                 throws java.io.IOException
¼­¸íµÈ È­ÀÏÀÇ ³»¿ëÀ» ÀúÀåÇÑ´Ù.
Parameters:
overwrite - µ¤¾î¾²±â ¿©ºÎ
Returns:
¼º°ø½Ã true, ½ÇÆÐ½Ã false
Throws:
java.io.IOException -  
Since:
6.0 v120

saveFile

public boolean saveFile(java.lang.String fileName,
                        boolean overwrite)
                 throws java.io.IOException
¼­¸íµÈ È­ÀÏÀÇ ³»¿ëÀ» ÀúÀåÇÑ´Ù.
Parameters:
fileName - ÀúÀåÇÒ È­ÀÏÀ̸§
overwrite - µ¤¾î¾²±â ¿©ºÎ
Returns:
¼º°ø½Ã true, ½ÇÆÐ½Ã false(È­ÀÏ Å©±â°¡ À߸øµÈ °æ¿ì)
Throws:
java.io.IOException -  
Since:
6.0 v120

resetRead

public void resetRead()
               throws java.io.IOException
¼­¸íµÈ È­ÀÏÀ» Àбâ À§ÇÑ ÃʱâÈ­ ÀÛ¾÷À» ¼öÇàÇÑ´Ù.
óÀ½ºÎÅÍ ´Ù½Ã Àд °æ¿ì »ç¿ëÇÒ ¼ö ÀÖ´Ù.
Throws:
java.io.IOException -  
Since:
6.0 v120