Sha256: b0fa4e423e2178a3c99a844efa7d3ab71355e32d0bbd814c7abca725e584ac9a
Contents?: true
Size: 641 Bytes
Versions: 13
Compression:
Stored size: 641 Bytes
Contents
module RASN1 module Types # ASN.1 Numeric String # @author Sylvain Daubert class NumericString < OctetString TAG = 18 # Get ASN.1 type # @return [String] def self.type 'NumericString' end private def value_to_der check_characters @value.to_s.force_encoding('BINARY') end def der_to_value(der, ber:false) super check_characters end def check_characters if @value.to_s =~ /([^0-9 ])/ raise ASN1Error, "NUMERIC STRING #@name: invalid character: '#{$1}'" end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems