Sha256: 82bf538a6b120865a37b76fc24827ed60514c99d8f530d6a5d314780bc984138
Contents?: true
Size: 536 Bytes
Versions: 3
Compression:
Stored size: 536 Bytes
Contents
# frozen_string_literal: true module RASN1 module Types # ASN.1 UTF8 String # @author Sylvain Daubert class Utf8String < OctetString # Utf8String id value ID = 12 # Get ASN.1 type # @return [String] def self.type 'UTF8String' end private def value_to_der @value.to_s.force_encoding('UTF-8').force_encoding('BINARY') end def der_to_value(der, ber: false) super @value = der.force_encoding('UTF-8') end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rasn1-0.11.0 | lib/rasn1/types/utf8_string.rb |
rasn1-0.10.0 | lib/rasn1/types/utf8_string.rb |
rasn1-0.9.0 | lib/rasn1/types/utf8_string.rb |