<?php

/** 
 * @author Robert Strutts <Robert@TryingToScale.com>
 * @copyright Copyright (c) 2022, Robert Strutts.
 * @license https://mit-license.org/
 */

\main_tts\registry::get('di')->register('session_encryption', function($args) {    
    try {
      $key = \main_tts\configure::get('sessions', 'session_key');
      return new \tts\services\paragon_crypto\sodium_storage($key);
    } catch (\Exception $e) {
     
    }
});