CakeFest 2024: The Official CakePHP Conference

sodium_pad

(PHP 7 >= 7.2.0, PHP 8)

sodium_padパディングデータを追加する

説明

sodium_pad(string $string, int $block_size): string

文字列の右側に、任意の長さのパディングを追加します。 タイミング攻撃に対しても安全です。

パラメータ

string

パディングされていない文字列。

block_size

ここで指定されたブロックサイズの偶数倍になるまで、 文字列にパディングが追加されます。

戻り値

パディングが追加された文字列。

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top