openssl_x509_checkpurpose

(PHP 4 >= 4.0.6, PHP 5, PHP 7) Verifies if a certificate can be used for a particular purpose int openssl_x509_checkpurpose ( mixed $x509cert, int $purpose [, array $cainfo = array() [, string $untrustedfile ]] ) openssl_x509_checkpurpose() examines a certificate to see if it can be used for the specified purpose. Parameters: x509cert The examined certificate.

openssl_x509_check_private_key

(PHP 4 >= 4.2.0, PHP 5, PHP 7) Checks if a private key corresponds to a certificate bool openssl_x509_check_private_key ( mixed $cert, mixed $key ) Checks whether the given key is the private key that corresponds to cert. Parameters: cert The certificate. key The private key. Returns: Returns TRUE if key is

openssl_verify

(PHP 4 >= 4.0.4, PHP 5, PHP 7) Verify signature int openssl_verify ( string $data, string $signature, mixed $pub_key_id [, mixed $signature_alg = OPENSSL_ALGO_SHA1 ] ) openssl_verify() verifies that the signature is correct for the specified data using the public key associated with pub_key_id. This must be the public key corresponding to the private key used for signing. Parameters:

openssl_spki_verify

(PHP 5 >= 5.6.0, PHP 7) Verifies a signed public key and challenge string openssl_spki_verify ( string &$spkac ) Validates the supplied signed public key and challenge Parameters: spkac Expects a valid signed public key and challenge Returns: Returns a boolean on success or failure. Exception: Emits an E_W

openssl_spki_new

(PHP 5 >= 5.6.0, PHP 7) Generate a new signed public key and challenge string openssl_spki_new ( resource &$privkey, string &$challenge [, int $algorithm = 0 ] ) Generates a signed public key and challenge using specified hashing algorithm Parameters: privkey privkey should be set to a private key that was previously generated by openssl_pkey_new() (or otherwi

openssl_spki_export

(PHP 5 >= 5.6.0, PHP 7) Exports a valid PEM formatted public key signed public key and challenge string openssl_spki_export ( string &$spkac ) Exports PEM formatted public key from encoded signed public key and challenge Parameters: spkac Expects a valid signed public key and challenge Returns: Returns the associated PEM formatted public k

openssl_spki_export_challenge

(PHP 5 >= 5.6.0, PHP 7) Exports the challenge assoicated with a signed public key and challenge string openssl_spki_export_challenge ( string &$spkac ) Exports challenge from encoded signed public key and challenge Parameters: spkac Expects a valid signed public key and challenge Returns: Returns the associated challenge string or NULL on

openssl_sign

(PHP 4 >= 4.0.4, PHP 5, PHP 7) Generate signature bool openssl_sign ( string $data, string &$signature, mixed $priv_key_id [, mixed $signature_alg = OPENSSL_ALGO_SHA1 ] ) openssl_sign() computes a signature for the specified data by generating a cryptographic digital signature using the private key associated with priv_key_id. Note that the data itself is not encrypted. Parameters:

openssl_seal

(PHP 4 >= 4.0.4, PHP 5, PHP 7) Seal (encrypt) data int openssl_seal ( string $data, string &$sealed_data, array &$env_keys, array $pub_key_ids [, string $method = "RC4" ] ) openssl_seal() seals (encrypts) data by using the given method with a randomly generated secret key. The key is encrypted with each of the public keys associated with the identifiers in pub_key_ids and each encrypted key is returned in env_key

openssl_random_pseudo_bytes

(PHP 5 >= 5.3.0, PHP 7) Generate a pseudo-random string of bytes string openssl_random_pseudo_bytes ( int $length [, bool &$crypto_strong ] ) Generates a string of pseudo-random bytes, with the number of bytes determined by the length parameter. It also indicates if a cryptographically strong algorithm was used to produce the pseudo-random bytes, and does this via the optional crypto_strong parameter. It's rare for