Airship\Engine\Cache\SharedMemory::__construct PHP Method

__construct() public method

.
public __construct ( Key $cacheKey = null, AuthenticationKey $authKey = null, string $personalization = '' )
$cacheKey Key
$authKey AuthenticationKey
$personalization string
    public function __construct(Key $cacheKey = null, AuthenticationKey $authKey = null, string $personalization = '')
    {
        if (!$cacheKey) {
            $state = State::instance();
            $cacheKey = $state->keyring['cache.hash_key'];
        }
        // We need a short hash key:
        $this->cacheKeyL = CryptoUtil::safeSubstr($cacheKey->getRawKeyMaterial(), 0, \Sodium\CRYPTO_SHORTHASH_KEYBYTES);
        $this->cacheKeyR = CryptoUtil::safeSubstr($cacheKey->getRawKeyMaterial(), \Sodium\CRYPTO_SHORTHASH_KEYBYTES, \Sodium\CRYPTO_SHORTHASH_KEYBYTES);
        if ($authKey) {
            $this->authKey = $authKey;
        }
        $this->personalization = $personalization;
    }