You are here

public static function ParagonIE_Sodium_Compat::crypto_stream_keygen in Automatic Updates 7

Same name and namespace in other branches
  1. 8 vendor/paragonie/sodium_compat/src/Compat.php \ParagonIE_Sodium_Compat::crypto_stream_keygen()

Return a secure random key for use with crypto_stream

Return value

string

Throws

Exception

Error

1 call to ParagonIE_Sodium_Compat::crypto_stream_keygen()
php72compat.php in vendor/paragonie/sodium_compat/lib/php72compat.php

File

vendor/paragonie/sodium_compat/src/Compat.php, line 3048

Class

ParagonIE_Sodium_Compat

Code

public static function crypto_stream_keygen() {
  return random_bytes(self::CRYPTO_STREAM_KEYBYTES);
}