gnupg
class gnupg (View source)
GNUPG Encryption Class
Constants
SIG_MODE_NORMAL |
|
SIG_MODE_DETACH |
|
SIG_MODE_CLEAR |
|
VALIDITY_UNKNOWN |
|
VALIDITY_UNDEFINED |
|
VALIDITY_NEVER |
|
VALIDITY_MARGINAL |
|
VALIDITY_FULL |
|
VALIDITY_ULTIMATE |
|
PROTOCOL_OpenPGP |
|
PROTOCOL_CMS |
|
SIGSUM_VALID |
|
SIGSUM_GREEN |
|
SIGSUM_RED |
|
SIGSUM_KEY_REVOKED |
|
SIGSUM_KEY_EXPIRED |
|
SIGSUM_SIG_EXPIRED |
|
SIGSUM_KEY_MISSING |
|
SIGSUM_CRL_MISSING |
|
SIGSUM_CRL_TOO_OLD |
|
SIGSUM_BAD_POLICY |
|
SIGSUM_SYS_ERROR |
|
ERROR_WARNING |
|
ERROR_EXCEPTION |
|
ERROR_SILENT |
|
PK_RSA |
|
PK_RSA_E |
|
PK_RSA_S |
|
PK_DSA |
|
PK_ELG |
|
PK_ELG_E |
|
PK_ECC |
|
PK_ECDSA |
|
PK_ECDH |
|
PK_EDDSA |
|
Methods
No description
Add a key for decryption
Verifies a signed text
Add a key for encryption
Add a key for signing
No description
No description
No description
Removes all keys which were set for decryption before
Removes all keys which were set for encryption before
Removes all keys which were set for signing before
Decrypts a given text
Decrypts and verifies a given text
Encrypts a given text
Encrypts and signs a given text
Exports a key
Returns the errortext, if a function fails
Returns the currently active protocol for all operations
Imports a key
Returns an array with information about all keys that matches the given pattern
Toggle armored output
Sets the mode for error_reporting
Sets the mode for signing
Signs a given text
Returns the engine info
Returns the error info
Details
__construct($options = null)
No description
bool
adddecryptkey(string $kye, string $passphrase)
Add a key for decryption
array|false
verify(string $text, string $signature, string $plaintext = null)
Verifies a signed text
bool
addencryptkey(string $kye)
Add a key for encryption
bool
addsignkey(string $kye, string $passphrase = null)
Add a key for signing
deletekey($kye, $allow_secret)
No description
gettrustlist($pattern)
No description
listsignatures($kyeid)
No description
bool
cleardecryptkeys()
Removes all keys which were set for decryption before
bool
clearencryptkeys()
Removes all keys which were set for encryption before
bool
clearsignkeys()
Removes all keys which were set for signing before
string|false
decrypt(string $enctext)
Decrypts a given text
array|false
decryptverify(string $enctext, string $plaintext)
Decrypts and verifies a given text
string|false
encrypt(string $text)
Encrypts a given text
string|false
encryptsign(string $text)
Encrypts and signs a given text
string|false
export(string $pattern)
Exports a key
string|false
geterror()
Returns the errortext, if a function fails
int
getprotocol()
Returns the currently active protocol for all operations
array|false
import(string $kye)
Imports a key
array
keyinfo(string $pattern, $secret_only = false)
Returns an array with information about all keys that matches the given pattern
bool
setarmor(int $armor)
Toggle armored output
void
seterrormode(int $errnmode)
Sets the mode for error_reporting
bool
setsignmode(int $signmode)
Sets the mode for signing
string|false
sign(string $text)
Signs a given text
array
getengineinfo()
Returns the engine info
array
geterrorinfo()
Returns the error info