Overview

Namespaces

  • None
  • Xmf
    • Database
    • Module
      • Helper
    • Template
  • Xoops
    • Auth
    • Core
      • Cache
      • Database
        • Logging
        • Schema
      • Exception
      • Handler
        • Scheme
      • Kernel
        • Dtype
        • Handlers
        • Model
      • Lists
      • Locale
        • Punic
      • Service
        • Contract
      • Session
      • Text
        • Sanitizer
          • Extensions
      • Theme
        • Plugins
    • Form
    • Html
    • Locale
    • Module
      • Helper
      • Plugin

Classes

  • Assets
  • ComposerUtility
  • Events
  • FilterInput
  • FixedGroups
  • HttpRequest
  • Logger
  • MediaUploader
  • MimeTypes
  • PreloadItem
  • Psr0ClassLoader
  • Psr4ClassLoader
  • Random
  • Registry
  • Request
  • Security
  • XoopsTpl
  • Yaml

Interfaces

  • AttributeInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class Random

XOOPS Random generator

Namespace: Xoops\Core
Package: Random
Category: Xoops\Core
Copyright: 2015 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
Version: Release: 1.0
Since: 2.0.0
Link: http://xoops.org
Located at oops_lib/Xoops/Core/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