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 3ee76e26ab
commit c4024b2534
4 changed files with 110 additions and 5 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