Blesta Source Documentation

Encryption extends AppModel

Company Encryption Settings

Table of Contents

Methods

__construct() Initialize Encryption settings
setPassphrase() Sets the new passphrase used to encrypt/decrypt the private key. When a blank private_key_passphrase is used the Blesta.system_key is used to encrypt the private key, allowing the system to decrypt it at will. However, if a private_key_passphrase is set that value is instead used to encrypt the private key and therefore only that key (which Blesta does not store) can be used to decrypt the private key.
verifyPassphrase() Verify if the given passphrase is valid
Methods

__construct()

Initialize Encryption settings

public __construct() : mixed

setPassphrase()

Sets the new passphrase used to encrypt/decrypt the private key. When a blank private_key_passphrase is used the Blesta.system_key is used to encrypt the private key, allowing the system to decrypt it at will. However, if a private_key_passphrase is set that value is instead used to encrypt the private key and therefore only that key (which Blesta does not store) can be used to decrypt the private key.

public setPassphrase(array<string|int, mixed> $vars[, bool $require_agree = false ]) : mixed
Parameters
$vars : array<string|int, mixed>

An array of passphrase info including:

  • current_passphrase The current passphrase in use (leave blank if no passphrase currently set)
  • private_key_passphrase The new password to use
  • confirm_new_passphrase The new password again, to confirm (optional)
  • agree Set to some non-empty value (e.g. "yes") if the user understands the ramifications of setting a passphrase
$require_agree : bool = false

Set to true to require that user has saved the passphrase to a safe location

verifyPassphrase()

Verify if the given passphrase is valid

public verifyPassphrase(string $passphrase) : bool
Parameters
$passphrase : string

The passphrase to test

Return values
bool

True if the passphrase is valid, false otherwise

Tags
subpackage

app.models

copyright

Copyright (c) 2010, Phillips Data, Inc.

license

http://www.blesta.com/license/ The Blesta License Agreement

link

Blesta


        
On this page

Search results