Application
Table of Contents
Classes
- base64
- Class base64: Provides static methods for encoding and decoding strings using a URL-safe variant of Base64. This encoding scheme replaces the standard Base64 characters '+' and '/' with '-' and '_', respectively, and removes any trailing '=' padding characters. This makes the encoded strings suitable for use in URLs and filenames without requiring further encoding.
- XoRx
- Class XoRx: Provides simple XOR-based encryption and decryption functionalities.
- Key
- Class Key: Represents a cryptographic key with associated metadata and functionality for generating, validating, and parsing tokens.
- ApiKeyMemory
- Class ApiKeyMemory: Extends the Key class to provide an in-memory storage mechanism for API keys.
- ApiKeyAPCu
- Class ApiKeyAPCu: Extends ApiKeyMemory to provide API key storage and retrieval using the APCu cache.
- ApiKeyMemcached
- Class ApiKeyMemcached: Extends the ApiKeyMemory class to store and retrieve API keys using Memcached.
- ApiKeyRedis
- Class ApiKeyRedis: Extends the ApiKeyMemory class to store and retrieve API keys using Redis.
- ApiKeyFS
- Class ApiKeyFS: Manages API keys, extending the in-memory storage with file system persistence.
- ApiKeyDatabase
- class ApiKeyDatabase: Manages API keys, extending the in-memory storage with database persistence using `PDO`.
- CLI
- Class CLI: Provides a command-line interface for generating and checking API keys.
Constants
- API_KEY_DEFAULT_ALGO = 'sha3-384'
- Default API Key Hashing Algorithm: This constant defines the default hashing algorithm used when generating API keys.
- API_KEY_DEFAULT_LENGTH = 33
- Default API Key Length: This constant specifies the default length (in characters) of newly generated API keys.
- API_KEY_VERSION = '0.0.1'
- API Key Version: This constant defines the current version of the API key structure and format.
Constants
API_KEY_DEFAULT_ALGO
Default API Key Hashing Algorithm: This constant defines the default hashing algorithm used when generating API keys.
public
mixed
API_KEY_DEFAULT_ALGO
= 'sha3-384'
It specifies the cryptographic hash function employed for security purposes.
Tags
API_KEY_DEFAULT_LENGTH
Default API Key Length: This constant specifies the default length (in characters) of newly generated API keys.
public
mixed
API_KEY_DEFAULT_LENGTH
= 33
It provides a standard length for security and consistency.
Tags
API_KEY_VERSION
API Key Version: This constant defines the current version of the API key structure and format.
public
mixed
API_KEY_VERSION
= '0.0.1'
It can be used for version control and to handle potential changes in future updates.