Method: Rnp.dearmor

Defined in:
lib/rnp/misc.rb

.dearmor(input:, output: nil) ⇒ nil, String

Remove ASCII Armor from data.

Parameters:

  • input (Input)

    the input to read the ASCII-Armored data from

  • output (Output) (defaults to: nil)

    the output to write the dearmored data to. If nil, the result will be returned directly as a String.

Returns:

  • (nil, String)


98
99
100
101
102
# File 'lib/rnp/misc.rb', line 98

def self.dearmor(input:, output: nil)
  Output.default(output) do |output_|
    Rnp.call_ffi(:rnp_dearmor, input.ptr, output_.ptr)
  end
end