method

decode

v2_2_9 - Show latest stable - Class: OpenSSL::ASN1
decode(p1)
public

Decodes a BER- or DER-encoded value and creates an ASN1Data instance. der may be a String or any object that features a #to_der method transforming it into a BER-/DER-encoded String.

Example

der = File.binread('asn1data')
asn1 = OpenSSL::ASN1.decode(der)