You are here

public static function ParagonIE_Sodium_Compat::crypto_secretstream_xchacha20poly1305_init_pull in Automatic Updates 7

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

Parameters

string $header:

string $key:

Return value

string Returns a state.

Throws

Exception

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

File

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

Class

ParagonIE_Sodium_Compat

Code

public static function crypto_secretstream_xchacha20poly1305_init_pull($header, $key) {
  if (ParagonIE_Sodium_Core_Util::strlen($header) < self::CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_HEADERBYTES) {
    throw new SodiumException('header size should be SODIUM_CRYPTO_SECRETSTREAM_XCHACHA20POLY1305_HEADERBYTES bytes');
  }
  if (PHP_INT_SIZE === 4) {
    return ParagonIE_Sodium_Crypto32::secretstream_xchacha20poly1305_init_pull($key, $header);
  }
  return ParagonIE_Sodium_Crypto::secretstream_xchacha20poly1305_init_pull($key, $header);
}