XMF Cookbook
  • Introduction
  • XMF Cookbook
  • Basic Ingredients
    • Namespaces
    • Autoloading
    • Debugging
    • Forward Compatibility
  • Recipes
    • Introducing Module Helpers
    • Using the Permission Helper
      • Checking Permissions
      • Managing Item Permissions
    • Using the Session Helper
    • Using JSON Web Tokens
    • Altering Database Tables
    • Migrating a Module's Database
    • Loading Initial Data
    • Module Admin Pages
      • Hide and Seek with Icons
      • Standard Admin Pages
    • Manage Metadata
    • Highlighting Content
  • Reference
    • Assert
      • Assertions
    • Database
      • Migrate
      • TableLoad
      • Tables
        • Getting Started
        • Table Operations
        • Working with Columns
        • Working with Indexes
        • Changing Table Data
        • Interacting with the Work Queue
        • Error Info and Debugging
    • Debug
    • FilterInput
    • Highlighter
    • IPAddress
    • Jwt
      • JsonWebToken
      • KeyFactory
      • TokenFactory
      • TokenReader
    • Key
      • ArrayStorage
      • Basic
      • FileStorage
      • KeyAbstract
      • StorageInterface
    • Language
    • Metagen
      • Extracting Data
      • Applying Data
    • Module
      • Admin
      • Helper
      • Helper
        • AbstractHelper
        • Cache
        • GenericHelper
        • Permission
        • Session
    • ProxyCheck
    • Random
    • Request
    • StopWords
    • Uuid
    • Yaml
  • Credits
  • License:
  • Table of Content
Powered by GitBook
On this page
  • __construct($storage, $name)
  • getSigning()
  • getVerifying()
  • create()
  • kill()
  1. Reference
  2. Key

KeyAbstract

The Xmf\Key\KeyAbstract is an abstract class that defines a Key.

The concrete implementations of KeyAbstract are responsible for

  • creating keys

  • serializing and deserializing key data for storage

  • interacting with a StorageInterface implementation for key persistence as needed

__construct($storage, $name)

The StorageInterface instance, $storage, handles persistence for this key. The $name parameter is the symbolic name of the key to use. The $name uniquely identifies the key in the key store. The key name should relate to a specific application action, or a closely related set of actions.

getSigning()

Returns a key string to be used for signing.

getVerifying()

Returns a key string to be used for verifying.

create()

Create the key and store it for use.

Returns true on success, otherwise false.

kill()

Delete the key from storage.

PreviousFileStorageNextStorageInterface

Last updated 6 years ago