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_public_encrypt

(PHP 4 >= 4.0.6, PHP 5, PHP 7) Encrypts data with public key bool openssl_public_encrypt ( string $data, string &$crypted, mixed $key [, int $padding = OPENSSL_PKCS1_PADDING ] ) openssl_public_encrypt() encrypts data with public key and stores the result into crypted. Encrypted data can be decrypted via openssl_private_decrypt(). This function can be used e.g. to encrypt message which can be then read only by owne

openssl_pkey_export

(PHP 4 >= 4.2.0, PHP 5, PHP 7) Gets an exportable representation of a key into a string bool openssl_pkey_export ( mixed $key, string &$out [, string $passphrase [, array $configargs ]] ) openssl_pkey_export() exports key as a PEM encoded string and stores it into out (which is passed by reference). Note: You need to have a valid openssl.cnf installed for this function to operate correctly. See the notes under the i

openssl_private_encrypt

(PHP 4 >= 4.0.6, PHP 5, PHP 7) Encrypts data with private key bool openssl_private_encrypt ( string $data, string &$crypted, mixed $key [, int $padding = OPENSSL_PKCS1_PADDING ] ) openssl_private_encrypt() encrypts data with private key and stores the result into crypted. Encrypted data can be decrypted via openssl_public_decrypt(). This function can be used e.g. to sign data (or its hash) to prove that it is not

openssl_pkey_get_details

(PHP 5 >= 5.2.0, PHP 7) Returns an array with the key details array openssl_pkey_get_details ( resource $key ) This function returns the key details (bits, key, type). Parameters: key Resource holding the key. Returns: Returns an array with the key details in success or FALSE in failure. Returned array has indexes bits (number of bits), key (s

openssl_pkey_new

(PHP 4 >= 4.2.0, PHP 5, PHP 7) Generates a new private key resource openssl_pkey_new ([ array $configargs ] ) openssl_pkey_new() generates a new private and public key pair. The public component of the key can be obtained using openssl_pkey_get_public(). Note: You need to have a valid openssl.cnf installed for this function to operate correctly. See the notes under the installation section for more information.

openssl_pkey_get_public

(PHP 4 >= 4.2.0, PHP 5, PHP 7) Extract public key from certificate and prepare it for use resource openssl_pkey_get_public ( mixed $certificate ) openssl_get_publickey() extracts the public key from certificate and prepares it for use by other functions. Parameters: certificate certificate can be one of the following: an X.509 certificate resource a string having the

openssl_pkey_free

(PHP 4 >= 4.2.0, PHP 5, PHP 7) Frees a private key void openssl_pkey_free ( resource $key ) This function frees a private key created by openssl_pkey_new(). Parameters: key Resource holding the key. Returns: No value is returned.

openssl_private_decrypt

(PHP 4 >= 4.0.6, PHP 5, PHP 7) Decrypts data with private key bool openssl_private_decrypt ( string $data, string &$decrypted, mixed $key [, int $padding = OPENSSL_PKCS1_PADDING ] ) openssl_private_decrypt() decrypts data that was previous encrypted via openssl_public_encrypt() and stores the result into decrypted. You can use this function e.g. to decrypt data which were supposed only to you. Par

openssl_pkey_get_private

(PHP 4 >= 4.2.0, PHP 5, PHP 7) Get a private key resource openssl_pkey_get_private ( mixed $key [, string $passphrase = "" ] ) openssl_get_privatekey() parses key and prepares it for use by other functions. Parameters: key key can be one of the following: a string having the format file://path/to/file.pem. The named file must contain a PEM encoded certificate/privat