Class: Ccrypto::Ruby::ASN1Object

Inherits:
ASN1Object
  • Object
show all
Defined in:
lib/ccrypto/ruby/engines/asn1_object.rb

Instance Method Summary collapse

Instance Method Details

#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