# frozen_string_literal: true require 'openssl' require 'legion/crypt/version' require 'legion/crypt/settings' require 'rbnacl' require 'base64' require 'legion/crypt/box' require 'legion/crypt/cipher' require 'legion/crypt/vault' module Legion module Crypt class << self attr_reader :sessions include Legion::Crypt::Cipher include Legion::Crypt::Vault if Legion::Settings[:crypt][:vault][:enabled] def start Legion::Logging.debug 'Legion::Crypt is running start' # load_keys if Dir.exist?('./settings') && File.exist?('./settings/private.key') && File.exist?('./settings/public.key') # connect_vault unless Legion::Settings[:crypt][:vault][:token].nil? end def shutdown shutdown_renewer close_sessions end end end end