Hawk - PHP documentation
  • Namespace
  • Class
  • Tree

Namespaces

  • Hawk
    • View
      • Plugins

Classes

  • App
  • ButtonInput
  • Cache
  • CheckboxInput
  • ColorInput
  • Conf
  • Controller
  • Crypto
  • DatabaseSessionHandler
  • DatetimeInput
  • DB
  • DBExample
  • DeleteInput
  • Dialogbox
  • EmailInput
  • ErrorHandler
  • Event
  • FileInput
  • FileSystem
  • FloatInput
  • Form
  • FormFieldset
  • FormInput
  • GenericModel
  • GifImage
  • HawkApi
  • HawkUpdater
  • HiddenInput
  • HtmlInput
  • HTTPRequest
  • Icon
  • Image
  • IntegerInput
  • ItemList
  • ItemListField
  • JpegImage
  • Lang
  • Language
  • LeftSidebarTab
  • Less
  • Logger
  • Mail
  • MenuItem
  • Model
  • NoSidebarTab
  • NumberInput
  • ObjectInput
  • Option
  • Panel
  • PasswordInput
  • Permission
  • Plugin
  • PluginInstaller
  • PngImage
  • ProfileQuestion
  • ProfileQuestionValue
  • RadioInput
  • Request
  • Response
  • RightSidebarTab
  • Role
  • RolePermission
  • Route
  • Router
  • SelectInput
  • Session
  • Singleton
  • SubmitInput
  • Tabs
  • TextareaInput
  • TextInput
  • Theme
  • TimeInput
  • Upload
  • User
  • View
  • ViewPlugin
  • Widget
  • WysiwygInput

Traits

  • Utils

Exceptions

  • AppStopException
  • DBExampleException
  • DBException
  • FileSystemException
  • HawkApiException
  • ImageException
  • MailException
  • UploadException
  • ViewException

Class Crypto

This class contains cryptography functions

Namespace: Hawk
Package: Security
Located at Crypto.php

Methods summary

public static string
# aes256Encode( string $data, string $key = CRYPTO_KEY, string $iv = CRYPTO_IV )

Encode a string with AES 256 algorithm

Encode a string with AES 256 algorithm

Parameters

$data
The data to encrypt
$key
The encryption key
$iv
The initialization vector for encryption

Returns

string
The encrypted data
public static string
# aes256Decode( string $data, string $key = CRYPTO_KEY, string $iv = CRYPTO_IV )

Decode with AES 256 algorithm

Decode with AES 256 algorithm

Parameters

$data
The data to decrypt
$key
The decryption key
$iv
The initialization vector for decryption

Returns

string
The decrypted data
public static string
# saltHash( string $data, string $salt = CRYPTO_SALT )

Hash a string with a salt

Hash a string with a salt

Parameters

$data
The data to hash
$salt
The salt to use before hashing

Returns

string
The hashed data
public static string
# generateKey( integer $length )

Generate random key

Generate random key

Parameters

$length
The length of the generated key

Returns

string
the generated key
Hawk - PHP documentation API documentation generated by ApiGen