Skip to content

CoreySecurity

Corey Avis edited this page Aug 13, 2026 · 1 revision

Corey Security Suite

The CoreySecurity class is a robust, zero-dependency cryptographic and identity toolkit designed for modern PHP applications. Rather than scattering security logic across multiple helpers, this class unifies secure generation, safe hashing, and password analysis into a single, cohesive engine.

Table of Contents

  1. Usage
  2. Parameters
  3. Public Methods
  4. Internal Methods
  5. Public Properties
  6. Configuration Options

Usage

$sec = new CoreySecurity(array $userConfig);

Parameters

userConfig : An array of initial configuration options; alternatively, use setConfig() to update these values later.

Public Methods

Config

The following methods are used to set configuration options.

Structure

The following methods manage global configuration states.

Generators

The following methods generate secure, highly complex, unpredictable, high-entropy raw data.

  • credentialGen - Generates credentials including password, salt, hashed(salt + password), and algorithm used
  • idGen - ID generator
  • passGen - Generates a secure password
  • saltGen - Generates a secure salt string

Hashing

The following methods handle the secure storage and verification of sensitive data.

  • hash - Generates a hash of a single string value
  • passHash - Creates a password hash by combining a password with a salt

Metrics

The following methods provide analytical intelligence, evaluating the quality of input data.

  • passEntropy - Calculates the entropy of a given password
  • passStrength - Evaluates the security strength of a given password

Internal Methods

The following methods are either private or protected. They are documented here for developers who wish to extend this class.

Inspectors

Helpers

Public Properties

Variable Description Example
algo The currently selected hashing algorithm. $sec->algo

Configuration Options

Refer to the Configuration Documentation section for a complete overview.


Home | CoreySecurity

Clone this wiki locally