xecure.file.tool
Class XecureFileDecrypt

java.lang.Object
  extended byxecure.file.tool.XecureFileDecrypt

public class XecureFileDecrypt
extends java.lang.Object

ÀÌ Å¬·¡½º´Â XecureFileInputStreamŬ·¡½ºÀÇ saveFileAsEnveloped()¸Þ¼Òµå¿¡ ÀÇÇØ ÀúÀåµÈ È­ÀÏÀ» º¹È£È­ ÇÑ´Ù. ÀνºÅϽº »ý¼ºÈÄ writeStream() ¶Ç´Â writeFile() ¸¦ ¼öÇàÇÏ¿© º¹È£È­ ÇÑ´Ù. Çѹø º¹È£È­ ÇÑ ÈÄ °°Àº ÀνºÅϽº·Î ´Ù½Ã º¹È£È­ÇÒ ¼ö ¾ø´Ù. ÀÌ °æ¿ì »õ·Î¿î ÀνºÅϽº¸¦ ¸¸µé¾î¾ß ÇÑ´Ù.

Since:
6.0 v120 customised

Constructor Summary
XecureFileDecrypt(java.io.InputStream reader, byte[] certificate, byte[] privateKey)
          Constructor
XecureFileDecrypt(java.io.InputStream reader, byte[] certFilePath, byte[] keyFilePath, byte[] encKeyPwd)
          Constructor
XecureFileDecrypt(java.lang.String filePath, byte[] certificate, byte[] privateKey)
          Constructor
XecureFileDecrypt(java.lang.String filePath, byte[] certFilePath, byte[] keyFilePath, byte[] encKeyPwd)
          Constructor
 
Method Summary
 byte[] getFileName()
          ¾ÏȣȭµÈ È­ÀÏÀÇ ¿øº» À̸§À» ¸®ÅÏÇÑ´Ù.
 int getFileSize()
          ¾ÏȣȭµÈ È­ÀÏÀÇ ¿øº» Å©±â¸¦ ¸®ÅÏÇÑ´Ù.
 java.lang.String getLastErrorMsg()
          ¿¡·¯¸Þ¼¼Áö¸¦ ¸®ÅÏÇÑ´Ù.
static byte[] getPwdFromFile(java.lang.String fileIn)
          È­ÀÏ·Î ºÎÅÍ ¾ÏȣȭµÈ °³ÀÎŰ ÆÐ½º¿öµå¸¦ °¡Á®¿Â´Ù.
 boolean writeFile(java.lang.String filePath, boolean overwrite)
          º¹È£È­µÈ ³»¿ëÀ» È­ÀÏ·Î Ãâ·ÂÇÑ´Ù.
 boolean writeStream(java.io.OutputStream writer)
          º¹È£È­µÈ ³»¿ëÀ» ½ºÆ®¸²À¸·Î Ãâ·ÂÇÑ´Ù.
 boolean writeStream(java.io.PrintWriter writer)
          º¹È£È­µÈ ³»¿ëÀ» ½ºÆ®¸²À¸·Î Ãâ·ÂÇÑ´Ù.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XecureFileDecrypt

public XecureFileDecrypt(java.io.InputStream reader,
                         byte[] certificate,
                         byte[] privateKey)
Constructor

Parameters:
reader - º¹È£È­ÇÒ È­ÀÏÀÇ ½ºÆ®¸²
certificate - º¹È£È­¿¡ »ç¿ëµÉ ÀÎÁõ¼­ (DER)
privateKey - º¹È£È­¿¡ »ç¿ëµÉ °³ÀÎŰ (DER)
Since:
6.0 v120 customised

XecureFileDecrypt

public XecureFileDecrypt(java.io.InputStream reader,
                         byte[] certFilePath,
                         byte[] keyFilePath,
                         byte[] encKeyPwd)
Constructor

Parameters:
reader - º¹È£È­ÇÒ È­ÀÏÀÇ ½ºÆ®¸²
certFilePath - º¹È£È­¿¡ »ç¿ëµÉ ÀÎÁõ¼­°¡ ÀúÀåµÈ È­ÀÏ À̸§
keyFilePath - º¹È£È­¿¡ »ç¿ëµÉ °³ÀÎ۰¡ ÀúÀåµÈ È­ÀÏ À̸§
encKeyPwd - ¾ÏȣȭµÈ °³ÀÎŰ ÆÐ½º¿öµå (¾Ïȣȭ ¾ÈµÇ¾úÀ» °æ¿ì nullÀÔ·Â)
Since:
6.0 v120 customised
See Also:
getPwdFromFile(String )

XecureFileDecrypt

public XecureFileDecrypt(java.lang.String filePath,
                         byte[] certificate,
                         byte[] privateKey)
                  throws java.io.FileNotFoundException
Constructor

Parameters:
filePath - º¹È£È­ÇÒ È­ÀÏ °æ·Î
certificate - º¹È£È­¿¡ »ç¿ëµÉ ÀÎÁõ¼­ (DER)
privateKey - º¹È£È­¿¡ »ç¿ëµÉ °³ÀÎŰ (DER)
Throws:
java.io.FileNotFoundException
Since:
6.0 v120 customised

XecureFileDecrypt

public XecureFileDecrypt(java.lang.String filePath,
                         byte[] certFilePath,
                         byte[] keyFilePath,
                         byte[] encKeyPwd)
                  throws java.io.FileNotFoundException
Constructor

Parameters:
filePath - º¹È£È­ÇÒ È­ÀÏ °æ·Î
certFilePath - º¹È£È­¿¡ »ç¿ëµÉ ÀÎÁõ¼­°¡ ÀúÀåµÈ È­ÀÏ À̸§
keyFilePath - º¹È£È­¿¡ »ç¿ëµÉ °³ÀÎ۰¡ ÀúÀåµÈ È­ÀÏ À̸§
encKeyPwd - ¾ÏȣȭµÈ °³ÀÎŰ ÆÐ½º¿öµå (¾Ïȣȭ ¾ÈµÇ¾úÀ» °æ¿ì nullÀÔ·Â)
Throws:
java.io.FileNotFoundException
Since:
6.0 v120 customised
See Also:
getPwdFromFile(String )
Method Detail

getPwdFromFile

public static byte[] getPwdFromFile(java.lang.String fileIn)
                             throws java.io.IOException
È­ÀÏ·Î ºÎÅÍ ¾ÏȣȭµÈ °³ÀÎŰ ÆÐ½º¿öµå¸¦ °¡Á®¿Â´Ù.

Parameters:
fileIn -
Returns:
¾ÏȣȭµÈ °³ÀÎŰ ÆÐ½º¿öµå
Throws:
java.io.IOException
Since:
6.0 v120 customised

writeStream

public boolean writeStream(java.io.OutputStream writer)
                    throws java.io.IOException
º¹È£È­µÈ ³»¿ëÀ» ½ºÆ®¸²À¸·Î Ãâ·ÂÇÑ´Ù.

Parameters:
writer - Ãâ·Â ½ºÆ®¸²
Returns:
¼º°ø : true, ½ÇÆÐ : false
Throws:
java.io.IOException
Since:
6.0 v120 customised

writeStream

public boolean writeStream(java.io.PrintWriter writer)
                    throws java.io.IOException
º¹È£È­µÈ ³»¿ëÀ» ½ºÆ®¸²À¸·Î Ãâ·ÂÇÑ´Ù.
µ¥ÀÌŸ¸¦ hexaÀÎÄÚµùÇÏ¿© Ãâ·ÂÇϹǷΠÆÄ¶ó¹ÌÅÍÀÎ java.io.PrintWriter
ÀνºÅϽº´Â hexaµðÄÚµùÇÏ¿© ó¸®ÇÏ¿©¾ß ÇÑ´Ù.

Parameters:
writer - Ãâ·Â ½ºÆ®¸²
Returns:
¼º°ø : true, ½ÇÆÐ : false
Throws:
java.io.IOException
Since:
6.0 v120 customised

writeFile

public boolean writeFile(java.lang.String filePath,
                         boolean overwrite)
                  throws java.io.IOException
º¹È£È­µÈ ³»¿ëÀ» È­ÀÏ·Î Ãâ·ÂÇÑ´Ù.

Parameters:
filePath -
overwrite - µ¤¾î¾²±â ¿©ºÎ
Returns:
¼º°ø : true, ½ÇÆÐ : false
Throws:
java.io.IOException
Since:
6.0 v120 customised

getLastErrorMsg

public java.lang.String getLastErrorMsg()
¿¡·¯¸Þ¼¼Áö¸¦ ¸®ÅÏÇÑ´Ù. ¾øÀ»°æ¿ì ""¸¦ ¸®ÅÏ.

Returns:
Since:
6.0 v120 customised

getFileSize

public int getFileSize()
¾ÏȣȭµÈ È­ÀÏÀÇ ¿øº» Å©±â¸¦ ¸®ÅÏÇÑ´Ù.
XecureWeb 6.0 v120 ÀÌÈÄ ¿¡¼­ ¾ÏȣȭµÈ °æ¿ì¸¸ Áö¿øµÈ´Ù.
È­ÀÏÅ©±â Á¤º¸°¡ ¾ø´Â°æ¿ì 0ÀÌ ¸®ÅϵȴÙ.

Returns:
¿øº» È­ÀÏ Å©±â
Since:
6.0 v120 customised

getFileName

public byte[] getFileName()
¾ÏȣȭµÈ È­ÀÏÀÇ ¿øº» À̸§À» ¸®ÅÏÇÑ´Ù.
XecureWeb 6.0 v120 ÀÌÈÄ ¿¡¼­ ¾ÏȣȭµÈ °æ¿ì¸¸ Áö¿øµÈ´Ù.
È­ÀÏÅ©±â Á¤º¸°¡ ¾ø´Â°æ¿ì nullÀÌ ¸®ÅϵȴÙ.

Returns:
¿øº»È­ÀÏ À̸§
Since:
6.0 v120 customised