Method: Ccrypto::Ruby::ASN1Object#to_bin

Defined in:
lib/ccrypto/ruby/engines/asn1_object.rb

#to_binObject



7
8
9
10
11
12
13
14
15
# File 'lib/ccrypto/ruby/engines/asn1_object.rb', line 7

def to_bin
  case @asn1
  when OpenSSL::ASN1::Sequence
    seq = OpenSSL::ASN1::Sequence.new(@asn1.map { |e| e.to_der })
    seq.to_der
  else
    @asn1.to_der
  end
end