summaryrefslogtreecommitdiff
path: root/controllers/security.rb
diff options
context:
space:
mode:
authoricebaker <113217272+icebaker@users.noreply.github.com>2023-06-04 11:54:39 -0300
committerGitHub <noreply@github.com>2023-06-04 11:54:39 -0300
commit60de4884e9ea8908a22978abe2a0c74865173132 (patch)
tree6154ff90cd8f92cdf3f4c4c246ae7161cc56196f /controllers/security.rb
parent851397413a914e2caee3e05468495dac5076812f (diff)
parent1c497945d4bbfef5dd44a074800bec83057bcc0a (diff)
Merge pull request #4 from icebaker/ib-end-user
New spec and end-user flow
Diffstat (limited to 'controllers/security.rb')
-rw-r--r--controllers/security.rb4
1 files changed, 4 insertions, 0 deletions
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 != ''