项目作者: 48763

项目描述 :
高级语言: Java
项目地址: git://github.com/48763/test-cipher-pj.git
创建时间: 2017-07-29T17:05:57Z
项目社区:https://github.com/48763/test-cipher-pj

开源协议:GNU General Public License v3.0

下载


修改與新增

version 1.2.5

  1. 修改 cache 的使用。
  2. 新增 length 在串流與字串的使用。

    version 1.2.4

  3. 修正 byte[] 讀出後寫入問題。
  4. 新增 enfile_read()。

File-Cipher

Class FileCipherStream


public class FileCipherStream

FileCipherStream 提供檔案的加密與解密。因為使用 filestream,所以可輕鬆應用在多數的檔案上。

加密的類型預設為 AES,使用者務必要將金鑰保存好。

Constructor Summary

Constructor and Description
FileCipherStream()
Description

Method Summary

Modifier and Type Method and Description
static void file_encrypt(String file_name, byte[] key)
Description
static void file_decrypt(String file_name, byte[] key)
Description
static String enfile_read(String file_name, byte[] key)
Description

Method Detail

file_encrypt

  1. public static void file_encrypt(String file_name, byte[] key)
  2. throws Exception
  3. /**
  4. * Parameters:
  5. * file_name -
  6. * key -
  7. * Throws:
  8. */

file_decrypt

  1. public static void file_decrypt(String file_name, byte[] key)
  2. throws Exception
  3. /**
  4. * Parameters:
  5. * file_name -
  6. * key -
  7. * Throws:
  8. */

enfile_read

  1. public static String enfile_read(String file_name, byte[] key)
  2. throws Exception
  3. /**
  4. * Parameters:
  5. * file_name -
  6. * key -
  7. * Throws:
  8. */