lib/legion/crypt.rb in legion-crypt-0.2.0 vs lib/legion/crypt.rb in legion-crypt-0.2.1
- old
+ new
@@ -1,23 +1,24 @@
# frozen_string_literal: true
require 'openssl'
+require 'base64'
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]
+
+ 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')