Thursday 19 April 2018

ASN.1: NumericString: string with numbers

Type: NumericString

Description: Use this when you want a string with only numeric characters.     

Example
salary NumericString

Example Schema
Person ::= SEQUENCE {
    name VisibleString,
    id VisibleString,
    email IA5String,
    salary NumericString
}

Sample data for above schema
person Person ::= {
    name "Rama Krishna",
    id "I123456",
    email "krishna@krishna.com",
    salary "543215"
}

XML encoding of above data
<?xml version="1.0" encoding="UTF-8"?>
<Person>
  <name>Rama Krishna</name>
  <id>I123456</id>
  <email>krishna@krishna.com</email>
  <salary>543215</salary>
</Person>






Previous                                                 Next                                                 Home

No comments:

Post a Comment