org.bouncycastle.openpgp.examples |
Examples of use of the org.bouncycastle.openpgp package.
|
Java Source File Name | Type | Comment |
ByteArrayHandler.java | Class | Simple routine to encrypt and decrypt using a passphrase. |
ClearSignedFileProcessor.java | Class | A simple utility class that creates clear signed files and verifies them. |
DetachedSignatureProcessor.java | Class | A simple utility class that creates seperate signatures for files and verifies them. |
DirectKeySignature.java | Class | A simple utility class that directly signs a public key and writes the signed key to "SignedKey.asc" in
the current working directory.
To sign a key: DirectKeySignature secretKeyFile secretKeyPass publicKeyFile(key to be signed) NotationName NotationValue.
To display a NotationData packet from a publicKey previously signed: DirectKeySignature signedPublicKeyFile.
Note: this example will silently overwrite files, nor does it pay any attention to
the specification of "_CONSOLE" in the filename. |
DSAElGamalKeyRingGenerator.java | Class | A simple utility class that generates a public/secret keyring containing a DSA signing
key and an El Gamal key for encryption.
usage: DSAElGamalKeyRingGenerator [-a] identity passPhrase
Where identity is the name to be associated with the public key. |
KeyBasedFileProcessor.java | Class | A simple utility class that encrypts/decrypts public key based
encryption files.
To encrypt a file: KeyBasedFileProcessor -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: KeyBasedFileProcessor -d fileName secretKeyFile passPhrase.
Note: this example will silently overwrite files, nor does it pay any attention to
the specification of "_CONSOLE" in the filename. |
KeyBasedLargeFileProcessor.java | Class | 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. |
PBEFileProcessor.java | Class | A simple utility class that encrypts/decrypts password based
encryption files.
To encrypt a file: PBEFileProcessor -e [-ai] fileName passPhrase.
If -a is specified the output file will be "ascii-armored".
If -i is specified the output file will be "integrity protected".
To decrypt: PBEFileProcessor -d fileName passPhrase.
Note: this example will silently overwrite files, nor does it pay any attention to
the specification of "_CONSOLE" in the filename. |
PubringDump.java | Class | Basic class which just lists the contents of the public key file passed
as an argument. |
RSAKeyPairGenerator.java | Class | A simple utility class that generates a RSA PGPPublicKey/PGPSecretKey pair.
usage: RSAKeyPairGenerator [-a] identity passPhrase
Where identity is the name to be associated with the public key. |
SignedFileProcessor.java | Class | A simple utility class that signs and verifies files.
To sign a file: SignedFileProcessor -s [-a] fileName secretKey passPhrase.
If -a is specified the output file will be "ascii-armored".
To decrypt: SignedFileProcessor -v fileName publicKeyFile.
Note: this example will silently overwrite files, nor does it pay any attention to
the specification of "_CONSOLE" in the filename. |