Class: EnMail::Adapters::RNP

Inherits:
Base
  • Object
show all
Includes:
Helpers::MessageManipulation, Helpers::RFC1847, Helpers::RFC3156
Defined in:
lib/enmail/adapters/rnp.rb

Overview

Secures e-mails according to RFC 3156 “MIME Security with OpenPGP”.

This adapter uses RNP library via ruby-rnp gem.

NOTE: ‘Rnp` instances are not thread-safe, and neither this adapter is. Any adapter instance should be accessed by at most one thread at a time.

Instance Attribute Summary collapse

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods included from Helpers::RFC3156

#sign_and_encrypt_combined, #sign_and_encrypt_encapsulated

Methods included from Helpers::RFC1847

#encrypt, #sign

Constructor Details

#initialize(*args) ⇒ RNP

Returns a new instance of RNP.



21
22
23
24
25
# File 'lib/enmail/adapters/rnp.rb', line 21

def initialize(*args)
  require_relative "rnp_requirements"
  super
  @rnp = build_rnp_and_load_keys
end

Instance Attribute Details

#rnpObject (readonly)

Returns the value of attribute rnp.



19
20
21
# File 'lib/enmail/adapters/rnp.rb', line 19

def rnp
  @rnp
end