ice framework documentation ice doc v1.6.2
Methods
  • setKey(variable $key) : void
  • setCipher(variable $cipher) : void
  • setMode(variable $mode) : void
  • setBlock(variable $block) : void
  • __construct(string $key) : void
    Create a new encrypter instance.
  • encrypt(string $text) : string
    Encrypt the given value.
  • generateInputVector() : string
    Generate an input vector.
  • doEncrypt(string $value, string $iv) : string
    Actually encrypt the value using the given Iv with the openssl library encrypt function.
  • decrypt(string $text) : string
    Decrypt the given value.
  • doDecrypt(string $value, string $iv) : string
    Actually decrypt the value using the given Iv with the openssl library decrypt function.
  • getJsonPayload(string $text) : array
    Get the JSON array from the given payload.
  • hash(string $value) : string
    Create a MAC for the given value.
  • addPadding(string $value) : string
    Add PKCS7 padding to a given value.
  • stripPadding(string $value) : string
    Remove the padding from the given value.
  • paddingIsValid(int $pad, string $value) : bool
    Determine if the given padding for a value is valid.
  • invalidPayload(array $data) : bool
    Verify that the encryption payload is valid.
  • getIvSize() : int
    Get the IV size for the cipher.
Methods Details
  • public function setKey(variable $key)

  • public function setCipher(variable $cipher)

  • public function setMode(variable $mode)

  • public function setBlock(variable $block)

  • public function __construct(string $key)

    Create a new encrypter instance.
  • public function encrypt(string $text)

    Encrypt the given value.
  • protected function generateInputVector()

    Generate an input vector.
  • protected function doEncrypt(string $value, string $iv)

    Actually encrypt the value using the given Iv with the openssl library encrypt function.
  • public function decrypt(string $text)

    Decrypt the given value.
  • protected function doDecrypt(string $value, string $iv)

    Actually decrypt the value using the given Iv with the openssl library decrypt function.
  • protected function getJsonPayload(string $text)

    Get the JSON array from the given payload.
  • protected function hash(string $value)

    Create a MAC for the given value.
  • protected function addPadding(string $value)

    Add PKCS7 padding to a given value.
  • protected function stripPadding(string $value)

    Remove the padding from the given value.
  • protected function paddingIsValid(int $pad, string $value)

    Determine if the given padding for a value is valid.
  • protected function invalidPayload(array $data)

    Verify that the encryption payload is valid.
  • protected function getIvSize()

    Get the IV size for the cipher.