Class: Rnp::Verify
- Inherits:
-
Object
- Object
- Rnp::Verify
- Defined in:
- lib/rnp/op/verify.rb
Overview
Verification operation
Defined Under Namespace
Classes: Signature
Instance Method Summary collapse
-
#execute ⇒ void
Execute the operation.
-
#good? ⇒ Boolean
Check if all signatures are good.
- #inspect ⇒ Object
-
#signatures ⇒ Array<Signature>
Get a list of the checked signatures.
Instance Method Details
#execute ⇒ void
This method returns an undefined value.
Execute the operation.
This should only be called once.
40 41 42 |
# File 'lib/rnp/op/verify.rb', line 40 def execute Rnp.call_ffi(:rnp_op_verify_execute, @ptr) end |
#good? ⇒ Boolean
Check if all signatures are good.
47 48 49 50 |
# File 'lib/rnp/op/verify.rb', line 47 def good? sigs = signatures sigs.size && sigs.all?(&:good?) end |
#inspect ⇒ Object
29 30 31 |
# File 'lib/rnp/op/verify.rb', line 29 def inspect Rnp.inspect_ptr(self) end |
#signatures ⇒ Array<Signature>
Get a list of the checked signatures.
55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/rnp/op/verify.rb', line 55 def signatures return @signatures unless @signatures.nil? @signatures = [] pptr = FFI::MemoryPointer.new(:pointer) (0...signature_count).each do |i| Rnp.call_ffi(:rnp_op_verify_get_signature_at, @ptr, i, pptr) psig = pptr.read_pointer @signatures << Signature.new(psig) end @signatures end |