You are here

private static function ParagonIE_Sodium_File::ftell in Automatic Updates 8

Same name and namespace in other branches
  1. 7 vendor/paragonie/sodium_compat/src/File.php \ParagonIE_Sodium_File::ftell()

Parameters

resource $resource:

Return value

int

Throws

SodiumException

5 calls to ParagonIE_Sodium_File::ftell()
ParagonIE_Sodium_File::onetimeauth_verify in vendor/paragonie/sodium_compat/src/File.php
ParagonIE_Sodium_File::onetimeauth_verify_core32 in vendor/paragonie/sodium_compat/src/File.php
One-time message authentication for 32-bit systems
ParagonIE_Sodium_File::secretbox_encrypt in vendor/paragonie/sodium_compat/src/File.php
Encrypt a file
ParagonIE_Sodium_File::secretbox_encrypt_core32 in vendor/paragonie/sodium_compat/src/File.php
Encrypt a file (32-bit)
ParagonIE_Sodium_File::updateHashWithFile in vendor/paragonie/sodium_compat/src/File.php
Update a hash context with the contents of a file, without loading the entire file into memory.

File

vendor/paragonie/sodium_compat/src/File.php, line 1557

Class

ParagonIE_Sodium_File
Class ParagonIE_Sodium_File

Code

private static function ftell($resource) {
  $return = ftell($resource);
  if (!is_int($return)) {
    throw new SodiumException('ftell() returned false');
  }
  return (int) $return;
}