# frozen_string_literal: true require 'openssl' require 'base64' require 'legion/crypt/version' require 'legion/crypt/settings' require 'legion/crypt/cipher' module Legion module Crypt class << self attr_reader :sessions include Legion::Crypt::Cipher if Legion::Settings[:crypt][:vault][:enabled] require 'legion/crypt/vault' include Legion::Crypt::Vault end 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