Class: GPGME::DecryptResult

Inherits:
Object
  • Object
show all
Defined in:
lib/gpgme/misc.rb,
lib/gpgme/ffi/decrypt_result.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#unsupported_algorithmObject (readonly)

Returns the value of attribute unsupported_algorithm.



18
19
20
# File 'lib/gpgme/misc.rb', line 18

def unsupported_algorithm
  @unsupported_algorithm
end

#wrong_key_usageObject (readonly)

Returns the value of attribute wrong_key_usage.



18
19
20
# File 'lib/gpgme/misc.rb', line 18

def wrong_key_usage
  @wrong_key_usage
end

Class Method Details

.new_from_struct(struct) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/gpgme/ffi/decrypt_result.rb', line 3

def self.new_from_struct(struct)
  instance = allocate

  instance.instance_exec do
    @unsupported_algorithm = struct[:unsupported_algorithm]
    @wrong_key_usage       = (struct[:flags] >> 0) & 1
  end

  instance
end