|
ezPGP Class Reference
Properties
Type |
Property |
Description |
| string |
KeyDir [get, set] |
PGP Key folder. The keyring files inside are pubring.gpg and secring.gpg |
| Boolean |
FileArmor [get, set] |
Filearmor: Decide if the encrypted file is armored (ASCII type) |
| Boolean |
KeyArmor [get, set] |
Keyarmor: Decide if the exported key file is armored (ASCII type) |
| string |
Compliance [get, set] |
Compliance: gnupg (default), openpgp, rfc4880, rfc2440, rfc1991, pgp2, pgp6 (for HSBC), pgp7, pgp8. |
| string |
Adk [get, set] |
Adk: Company key, all data will be encrypted by this key as well. |
Public Member Functions
Type |
Function |
Description |
| |
ezPGP () |
Constructor, use default options: pgpCommand path, Keyring directory=user home directory, file armored=false, key armored=true |
| |
ezPGP (string pgpcmd, string keydir) |
Constructor: specify pgp execution path and keyring directory. |
| int |
PGPEncryptFile (string infile, string outfile, string keys) |
Encrypt File. |
| int |
PGPEncryptFile (string infile, string outfile, List< string > keys) |
Encrypt File. |
| int |
PGPEncryptText (string inbuf, ref string outbuf, string keys) |
Encrypt Text. |
| int |
PGPEncryptText (string inbuf, ref string outbuf, List< string > keys) |
Encrypt Text. |
| int |
PGPEncryptSign (string infile, string outfile, string keys, string signkey, string pass) |
Encrypt and Sign File.
|
| int |
PGPEncryptSign (string infile, string outfile, List< string > keys, string signkey, string pass) |
Encrypt and Sign File.
|
| int |
PGPEncryptSignText (string inbuf, ref string outbuf, List< string > keys, string signkey, string pass) |
Encrypt and Sign Text.
|
| int |
PGPDecryptFile (string infile, string outfile, string pass) |
Decrypt (and verify if it was signed) File. |
| int |
PGPDecryptFile (string infile, ref string outfile, string outdir, string pass) |
Decrypt (and verify if it was signed) File, and return the original file name and put into outdir folder. |
| int |
PGPDecryptText (string inbuf, ref string outbuf, string pass) |
Decrypt (and verify if it was signed) Text. |
| int |
PGPClearSign (string infile, string signfile, string signkey, string pass) |
Sign File Only. |
| int |
PGPVerify (string infile, string signfile) |
Verify the signature with the original file. |
| int |
PGPKeyList (string keyname, int seckey, Stream outputdata) |
List Keys to stream. |
| int |
PGPKeyList (string keyname, int seckey, List< PGPKeys > rawkeylist) |
List Keys to list of PGPKeys.
|
| int |
PGPKeyImport (string keyfile) |
Import a key from key file (usually with .asc extention name) |
| int |
PGPKeyExport (string keyname, string filename, int keypair) |
Export a key to key file (usually with .asc extention name) |
| int |
PGPKeyDelete (string keyfpr) |
Delete a key, include private key if it has. |
| int |
PGPKeyGen (string usrname, string email, string keytype, int keylen, int days, string pwd) |
Generate a key pair.
|
| int |
PGPChangePass (string keyname, string oldpass, string newpass) |
Change the key password. |
| string |
PGPGetErrorMsg (int rc) |
Get Error Message: For all other API, if the return code is not 0, you should call this function to get the error message. |
|