WIP Encrypt outgoing emails when possible
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-09-25 23:43:11 +02:00
parent 534e5a9d3c
commit 94daed9a06
5 changed files with 111 additions and 6 deletions

View File

@@ -0,0 +1,19 @@
require 'gpgme'
module UserManager
class PgpEncrypt < UserManagerService
def initialize(user:, text:)
@user = user
@text = text
end
def call
crypto = GPGME::Crypto.new
crypto.encrypt(
@text,
recipients: @user.gnupg_key,
always_trust: true
)
end
end
end