Overview

Namespaces

  • Composer
    • Autoload
  • Geekwright
    • RegDom
  • League
    • OAuth2
      • Client
        • Provider
  • None
  • Xmf
    • Database
    • Jwt
    • Key
    • Module
      • Helper

Classes

  • Assert
  • Debug
  • FilterInput
  • Highlighter
  • IPAddress
  • Language
  • Metagen
  • Random
  • Request
  • StopWords
  • Yaml
  • Overview
  • Namespace
  • Class
  • Tree

Class Random

XOOPS Random generator

Namespace: Xmf
Package: Xmf
Category: Xmf\Random
Copyright: 2015-2016 XOOPS Project (http://xoops.org)
License: GPL 2 or later (http://www.gnu.org/licenses/gpl-2.0.html)
Author: Richard Griffith richard@geekwright.com
Link: http://xoops.org
Located at lass/libraries/vendor/xoops/xmf/src/Xmf/Random.php
Methods summary
public static string
# generateOneTimeToken( string $hash = 'sha512', integer $bytes = 64 )

Create a one time token

Create a one time token

Generates a low strength random number of size $bytes and hash with the algorithm specified in $hash.

Parameters

$hash
hash function to use
$bytes
the number of random bit to generate

Returns

string
hashed token
public static string
# generateKey( string $hash = 'sha512', integer $bytes = 128 )

Create a medium strength key

Create a medium strength key

Generates a medium strength random number of size $bytes and hash with the algorithm specified in $hash.

Parameters

$hash
hash function to use
$bytes
the number of random bytes to generate

Returns

string
hashed token
API documentation generated by ApiGen