org.bouncycastle.openpgp.examples
Class KeyBasedLargeFileProcessor
java.lang.Object
org.bouncycastle.openpgp.examples.KeyBasedLargeFileProcessor
public class KeyBasedLargeFileProcessor
extends java.lang.Object
A simple utility class that encrypts/decrypts public key based
encryption large files.
To encrypt a file: KeyBasedLargeFileProcessor -e [-a|-ai] fileName publicKeyFile.
If -a is specified the output file will be "ascii-armored".
If -i is specified the output file will be have integrity checking added.
To decrypt: KeyBasedLargeFileProcessor -d fileName secretKeyFile passPhrase.
Note 1: this example will silently overwrite files, nor does it pay any attention to
the specification of "_CONSOLE" in the filename. It also expects that a single pass phrase
will have been used.
Note 2: this example generates partial packets to encode the file, the output it generates
will not be readable by older PGP products or products that don't support partial packet
encoding.
Note 3: if an empty file name has been specified in the literal data object contained in the
encrypted packet a file with the name filename.out will be generated in the current working directory.
static void | main(String[] args)
|
main
public static void main(String[] args)
throws Exception