array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'es', ), 'this' => array ( 0 => 'function.sodium-pad.php', 1 => 'sodium_pad', ), 'up' => array ( 0 => 'ref.sodium.php', 1 => 'Sodium Funciones', ), 'prev' => array ( 0 => 'function.sodium-memzero.php', 1 => 'sodium_memzero', ), 'next' => array ( 0 => 'function.sodium-unpad.php', 1 => 'sodium_unpad', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/sodium/functions/sodium-pad.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 7 >= 7.2.0, PHP 8)
sodium_pad — Add padding data
Right-pad a string to a desired length. Timing-safe.
string
Unpadded string.
block_size
The string will be padded until it is an even multiple of the block size.
Padded string.