From 1c497945d4bbfef5dd44a074800bec83057bcc0a Mon Sep 17 00:00:00 2001 From: icebaker Date: Sun, 4 Jun 2023 11:49:00 -0300 Subject: new spec and end-user flow --- controllers/security.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'controllers/security.rb') diff --git a/controllers/security.rb b/controllers/security.rb index 8f066a5..c1180f2 100644 --- a/controllers/security.rb +++ b/controllers/security.rb @@ -9,6 +9,10 @@ module NanoBot Components::Crypto.decrypt(content) end + def self.encrypt(content, soft: false) + Components::Crypto.encrypt(content, soft:) + end + def self.check password = ENV.fetch('NANO_BOTS_ENCRYPTION_PASSWORD', nil) password = 'UNSAFE' unless password && password != '' -- cgit v1.2.3