ParagonIE\Halite\Symmetric\Crypto::splitKeys PHP Method

splitKeys() public static method

Split a key (using HKDF-BLAKE2b instead of HKDF-HMAC-*)
public static splitKeys ( EncryptionKey $master, string $salt = '', BaseConfig $config = null ) : array
$master EncryptionKey
$salt string
$config BaseConfig
return array
    public static function splitKeys(EncryptionKey $master, string $salt = '', BaseConfig $config = null) : array
    {
        $binary = $master->getRawKeyMaterial();
        return [CryptoUtil::hkdfBlake2b($binary, \Sodium\CRYPTO_SECRETBOX_KEYBYTES, $config->HKDF_SBOX, $salt), CryptoUtil::hkdfBlake2b($binary, \Sodium\CRYPTO_AUTH_KEYBYTES, $config->HKDF_AUTH, $salt)];
    }