Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

OpenSSL::ASN1.decode_all

OpenSSL::ASN1.decode_all(der) → Array of ASN1Data

Similar to decode with the difference that decode expects one distinct value represented in der. decode_all on the contrary decodes a sequence of sequential BER/DER values lined up in der and returns them as an array.

Example

Example
ders = File.binread('asn1data_seq')
asn1_ary = OpenSSL::ASN1.decode_all(ders)
See also .decode .traverse also in 4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.1