You are here

public static function ParagonIE_Sodium_Core_Util::strlen in Automatic Updates 8

Same name and namespace in other branches
  1. 7 vendor/paragonie/sodium_compat/src/Core/Util.php \ParagonIE_Sodium_Core_Util::strlen()

Safe string length

@internal You should not use this directly from another application

@ref mbstring.func_overload

Parameters

string $str:

Return value

int

Throws

TypeError

142 calls to ParagonIE_Sodium_Core_Util::strlen()
ParagonIE_Sodium_Compat::add in vendor/paragonie/sodium_compat/src/Compat.php
Add two numbers (little-endian unsigned), storing the value in the first parameter.
ParagonIE_Sodium_Compat::base642bin in vendor/paragonie/sodium_compat/src/Compat.php
ParagonIE_Sodium_Compat::bin2base64 in vendor/paragonie/sodium_compat/src/Compat.php
ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_decrypt in vendor/paragonie/sodium_compat/src/Compat.php
Authenticated Encryption with Associated Data: Decryption
ParagonIE_Sodium_Compat::crypto_aead_aes256gcm_encrypt in vendor/paragonie/sodium_compat/src/Compat.php
Authenticated Encryption with Associated Data: Encryption

... See full list

File

vendor/paragonie/sodium_compat/src/Core/Util.php, line 749

Class

ParagonIE_Sodium_Core_Util
Class ParagonIE_Sodium_Core_Util

Code

public static function strlen($str) {

  /* Type checks: */
  if (!is_string($str)) {
    throw new TypeError('String expected');
  }
  return (int) (self::isMbStringOverride() ? mb_strlen($str, '8bit') : strlen($str));
}