public class FileEncryptor_ChaCha20_BouncyCastle
extends java.lang.Object
Encrypted binary file format when passphrase is used
+-----------------------+
| salt | 16 bytes
+-----------------------+
| IV | 8 bytes
+-----------------------+
| encrypted file data | n bytes
+-----------------------+
Encrypted binary file format when key is used
+-----------------------+
| IV | 8 bytes
+-----------------------+
| encrypted file data | n bytes
+-----------------------+
| Constructor and Description |
|---|
FileEncryptor_ChaCha20_BouncyCastle() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
decryptFileWithKey(byte[] key,
byte[] fileData) |
static void |
decryptFileWithKey(byte[] key,
java.io.File inputFile,
java.io.File outputFile) |
static byte[] |
decryptFileWithPassphrase(java.lang.String passphrase,
byte[] fileData) |
static void |
decryptFileWithPassphrase(java.lang.String passphrase,
java.io.File inputFile,
java.io.File outputFile) |
static byte[] |
encryptFileWithKey(byte[] key,
byte[] fileData) |
static void |
encryptFileWithKey(byte[] key,
java.io.File inputFile,
java.io.File outputFile) |
static byte[] |
encryptFileWithPassphrase(java.lang.String passphrase,
byte[] fileData) |
static void |
encryptFileWithPassphrase(java.lang.String passphrase,
java.io.File inputFile,
java.io.File outputFile) |
static boolean |
isSupported() |
public static boolean isSupported()
public static void encryptFileWithPassphrase(java.lang.String passphrase,
java.io.File inputFile,
java.io.File outputFile)
throws java.lang.Exception
java.lang.Exceptionpublic static byte[] encryptFileWithPassphrase(java.lang.String passphrase,
byte[] fileData)
throws java.lang.Exception
java.lang.Exceptionpublic static void encryptFileWithKey(byte[] key,
java.io.File inputFile,
java.io.File outputFile)
throws java.lang.Exception
java.lang.Exceptionpublic static byte[] encryptFileWithKey(byte[] key,
byte[] fileData)
throws java.lang.Exception
java.lang.Exceptionpublic static void decryptFileWithPassphrase(java.lang.String passphrase,
java.io.File inputFile,
java.io.File outputFile)
throws java.lang.Exception
java.lang.Exceptionpublic static byte[] decryptFileWithPassphrase(java.lang.String passphrase,
byte[] fileData)
throws java.lang.Exception
java.lang.Exceptionpublic static void decryptFileWithKey(byte[] key,
java.io.File inputFile,
java.io.File outputFile)
throws java.lang.Exception
java.lang.Exceptionpublic static byte[] decryptFileWithKey(byte[] key,
byte[] fileData)
throws java.lang.Exception
java.lang.Exception