Chuyển đến nội dung
Tài liệu

Tra cứu lớp và hàm

Security

Danh sách các phương thức công khai của lớp Zittme\Framework\Security. Tài liệu này được tạo tự động từ mã nguồn lõi Zittme.

Nguồn: common/framework/Security.php

Phương thức công khai

  • static function sanitize(string $input, string $type)
  • Sanitize a variable.
  • static function encrypt(string $plaintext, ?string $key = null)
  • Encrypt a string using AES.
  • static function decrypt(string $ciphertext, ?string $key = null)
  • Decrypt a string using AES.
  • static function createSignature(string $string)
  • Create a digital signature to verify the authenticity of a string.
  • static function verifySignature(string $string, string $signature)
  • Check whether a signature is valid.
  • static function getRandom(int $length = 32, string $format = 'alnum')
  • Generate a cryptographically secure random string.
  • static function getRandomNumber(int $min = 0, int $max = \PHP_INT_MAX)
  • Generate a cryptographically secure random number between $min and $max.
  • static function getRandomUUID(int $version = 4)
  • Generate a random UUID.
  • static function compareStrings(string $a, string $b)
  • Compare two strings in constant time.
  • static function checkCSRF(?string $referer = null)
  • Check if the current request seems to be a CSRF attack.
  • static function checkXXE(?string $xml = null)
  • Check if the current request seems to be an XXE (XML external entity) attack.