Sodium
- Introduction
- Installing/Configuring
- Predefined Constants
- Sodium Functions
- sodium_add — Add large numbers
- sodium_base642bin — Description
- sodium_bin2base64 — Description
- sodium_bin2hex — Encode to hexadecimal
- sodium_compare — Compare large numbers
- sodium_crypto_aead_aes256gcm_decrypt — Decrypt in combined mode with precalculation
- sodium_crypto_aead_aes256gcm_encrypt — Encrypt in combined mode with precalculation
- sodium_crypto_aead_aes256gcm_is_available — Check if hardware supports AES256-GCM
- sodium_crypto_aead_aes256gcm_keygen — Get random bytes for key
- sodium_crypto_aead_chacha20poly1305_decrypt — Verify that the ciphertext includes a valid tag
- sodium_crypto_aead_chacha20poly1305_encrypt — Encrypt a message
- sodium_crypto_aead_chacha20poly1305_ietf_decrypt — Verify that the ciphertext includes a valid tag
- sodium_crypto_aead_chacha20poly1305_ietf_encrypt — Encrypt a message
- sodium_crypto_aead_chacha20poly1305_ietf_keygen — Get random bytes for key
- sodium_crypto_aead_chacha20poly1305_keygen — Get random bytes for key
- sodium_crypto_aead_xchacha20poly1305_ietf_decrypt — Description
- sodium_crypto_aead_xchacha20poly1305_ietf_encrypt — Description
- sodium_crypto_aead_xchacha20poly1305_ietf_keygen — Description
- sodium_crypto_auth_keygen — Get random bytes for key
- sodium_crypto_auth_verify — Verifies that the tag is valid for the message
- sodium_crypto_auth — Compute a tag for the message
- sodium_crypto_box_keypair_from_secretkey_and_publickey — Description
- sodium_crypto_box_keypair — Randomly generate a secret key and a corresponding public key
- sodium_crypto_box_open — Verify and decrypt a ciphertext
- sodium_crypto_box_publickey_from_secretkey — Description
- sodium_crypto_box_publickey — Description
- sodium_crypto_box_seal_open — Decrypt the ciphertext
- sodium_crypto_box_seal — Encrypt a message
- sodium_crypto_box_secretkey — Description
- sodium_crypto_box_seed_keypair — Deterministically derive the key pair from a single key
- sodium_crypto_box — Encrypt a message
- sodium_crypto_generichash_final — Complete the hash
- sodium_crypto_generichash_init — Initialize a hash
- sodium_crypto_generichash_keygen — Get random bytes for key
- sodium_crypto_generichash_update — Add message to a hash
- sodium_crypto_generichash — Get a hash of the message
- sodium_crypto_kdf_derive_from_key — Derive a subkey
- sodium_crypto_kdf_keygen — Get random bytes for key
- sodium_crypto_kx_client_session_keys — Description
- sodium_crypto_kx_keypair — Creates a new sodium keypair
- sodium_crypto_kx_publickey — Description
- sodium_crypto_kx_secretkey — Description
- sodium_crypto_kx_seed_keypair — Description
- sodium_crypto_kx_server_session_keys — Description
- sodium_crypto_pwhash_scryptsalsa208sha256_str_verify — Verify that the password is a valid password verification string
- sodium_crypto_pwhash_scryptsalsa208sha256_str — Get an ASCII encoded hash
- sodium_crypto_pwhash_scryptsalsa208sha256 — Derives a key from a password
- sodium_crypto_pwhash_str_needs_rehash — Description
- sodium_crypto_pwhash_str_verify — Verifies that a password matches a hash
- sodium_crypto_pwhash_str — Get an ASCII-encoded hash
- sodium_crypto_pwhash — Derive a key from a password
- sodium_crypto_scalarmult_base — Alias of sodium_crypto_box_publickey_from_secretkey
- sodium_crypto_scalarmult — Compute a shared secret given a user's secret key and another user's public key
- sodium_crypto_secretbox_keygen — Get random bytes for key
- sodium_crypto_secretbox_open — Verify and decrypt a ciphertext
- sodium_crypto_secretbox — Encrypt a message
- sodium_crypto_secretstream_xchacha20poly1305_init_pull — Description
- sodium_crypto_secretstream_xchacha20poly1305_init_push — Description
- sodium_crypto_secretstream_xchacha20poly1305_keygen — Description
- sodium_crypto_secretstream_xchacha20poly1305_pull — Description
- sodium_crypto_secretstream_xchacha20poly1305_push — Description
- sodium_crypto_secretstream_xchacha20poly1305_rekey — Description
- sodium_crypto_shorthash_keygen — Get random bytes for key
- sodium_crypto_shorthash — Compute a fixed-size fingerprint for the message
- sodium_crypto_sign_detached — Sign the message
- sodium_crypto_sign_ed25519_pk_to_curve25519 — Convert an Ed25519 public key to a Curve25519 public key
- sodium_crypto_sign_ed25519_sk_to_curve25519 — Convert an Ed25519 secret key to a Curve25519 secret key
- sodium_crypto_sign_keypair_from_secretkey_and_publickey — Description
- sodium_crypto_sign_keypair — Randomly generate a secret key and a corresponding public key
- sodium_crypto_sign_open — Check that the signed message has a valid signature
- sodium_crypto_sign_publickey_from_secretkey — Extract the public key from the secret key
- sodium_crypto_sign_publickey — Description
- sodium_crypto_sign_secretkey — Description
- sodium_crypto_sign_seed_keypair — Deterministically derive the key pair from a single key
- sodium_crypto_sign_verify_detached — Verify signature for the message
- sodium_crypto_sign — Sign a message
- sodium_crypto_stream_keygen — Get random bytes for key
- sodium_crypto_stream_xor — Encrypt a message
- sodium_crypto_stream — Generate a deterministic sequence of bytes from a seed
- sodium_hex2bin — Decodes a hexadecimally encoded binary string
- sodium_increment — Increment large number
- sodium_memcmp — Test for equality in constant-time
- sodium_memzero — Overwrite buf with zeros
- sodium_pad — Add padding data
- sodium_unpad — Remove padding data
English translation
You have asked to visit this site in English. For now, only the interface is translated, but not all the content yet.If you want to help me in translations, your contribution is welcome. All you need to do is register on the site, and send me a message asking me to add you to the group of translators, which will give you the opportunity to translate the pages you want. A link at the bottom of each translated page indicates that you are the translator, and has a link to your profile.
Thank you in advance.
Document created the 30/01/2003, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/php-rf-book.sodium.html
The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.
References
These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.