略微加速

PHP官方手册 - 互联网笔记

PHP - Manual: sodium_crypto_kdf_derive_from_key

2024-12-22

sodium_crypto_kdf_derive_from_key

(PHP 7 >= 7.2.0, PHP 8)

sodium_crypto_kdf_derive_from_keyDerive a subkey

说明

sodium_crypto_kdf_derive_from_key(
    int $subkey_length,
    int $subkey_id,
    string $context,
    string $key
): string

Derive a subkey from a root key and additional context.

Similar to hash_hkdf().

参数

subkey_length

Length of the key to return (in bytes)

subkey_id

Return the Nth subkey from a given root key. Useful for seeking.

context

Application-specific context.

key

The root key from which the subkey is derived.

返回值

A string of pseudorandom (raw binary) bytes.

add a noteadd a note

User Contributed Notes

There are no user contributed notes for this page.

官方地址:https://www.php.net/manual/en/function.sodium-crypto-kdf-derive-from-key.php

北京半月雨文化科技有限公司.版权所有 京ICP备12026184号-3