{"id":"asn1-der-primitive-encode","version":"1.0.0","description":"Encode one universal DER primitive from typed fields into lowercase hex.","supported_operations":["encode one der primitive value","build an asn.1 universal tlv","write der boolean integer and null","encode der bit string and octet string","encode der utctime or generalizedtime","build an object identifier tlv from arcs","typed primitive fields into lowercase hex","קידוד ערך פרימיטיבי אחד"],"unsupported_operations":["decode a der hex value","format object identifier arcs as brace notation","constructed or indefinite ber encodings","sign or encrypt the encoded value"],"semantics":["One primitive universal value per call. The caller passes type_name and only that type's fields. NULL has no other field. OBJECT IDENTIFIER takes an arcs array of canonical decimal strings, not notation text.","Integers are canonical decimal strings (no sign on zero, no leading zeros). Bytes are lowercase hex. TRUE is ff and FALSE is 00. BIT STRING unused bits are 0..7 and the unused bits themselves are zero.","Length is the definite minimum form. Strings are primitive. UTCTime is exactly YYMMDDHHMMSSZ. GeneralizedTime is YYYYMMDDHHMMSSZ or YYYYMMDDHHMMSS.fractionZ with a point, no comma, and no trailing zero in the fraction. No local offset and no leap second.","max_value_bytes applies to a present integer or text string and is checked before syntax, even when that field does not belong to type_name. max_payload_hex_chars applies to a present payload_hex string the same way.","max_oid_arcs and max_oid_arc_digits apply only when arcs is an array on an object_identifier value: the array length is checked before item syntax, then each arc string's length is checked before the digit grammar. No other arc cap is enforced.","A field that does not belong to type_name, a non-canonical integer, or a DER rule failure is invalid_input. type_name outside the selected set is invalid_input.","Disclaimer: format transform only; provides no confidentiality, integrity, or authenticity."],"limits":{"max_value_bytes":256,"max_payload_hex_chars":512,"max_oid_arcs":32,"max_oid_arc_digits":48},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["type_name"],"properties":{"type_name":{"type":"string","enum":["boolean","integer","bit_string","octet_string","null","object_identifier","utf8_string","numeric_string","printable_string","ia5_string","utc_time","generalized_time","visible_string"]},"boolean":{"type":"boolean"},"integer":{"type":"string","minLength":1,"maxLength":256,"pattern":"^(0|-?[1-9][0-9]*)$"},"unused_bits":{"type":"integer","minimum":0,"maximum":7},"payload_hex":{"type":"string","maxLength":512,"pattern":"^(?:[0-9a-f]{2})*$"},"arcs":{"type":"array","minItems":2,"maxItems":32,"items":{"type":"string","minLength":1,"maxLength":48,"pattern":"^(0|[1-9][0-9]*)$"}},"text":{"type":"string","maxLength":256}},"oneOf":[{"type":"object","additionalProperties":false,"required":["type_name","boolean"],"properties":{"type_name":{"const":"boolean"},"boolean":{"type":"boolean"}}},{"type":"object","additionalProperties":false,"required":["type_name","integer"],"properties":{"type_name":{"const":"integer"},"integer":{"type":"string","minLength":1,"maxLength":256,"pattern":"^(0|-?[1-9][0-9]*)$"}}},{"type":"object","additionalProperties":false,"required":["type_name","unused_bits","payload_hex"],"properties":{"type_name":{"const":"bit_string"},"unused_bits":{"type":"integer","minimum":0,"maximum":7},"payload_hex":{"type":"string","maxLength":512,"pattern":"^(?:[0-9a-f]{2})*$"}}},{"type":"object","additionalProperties":false,"required":["type_name","payload_hex"],"properties":{"type_name":{"const":"octet_string"},"payload_hex":{"type":"string","maxLength":512,"pattern":"^(?:[0-9a-f]{2})*$"}}},{"type":"object","additionalProperties":false,"required":["type_name"],"properties":{"type_name":{"const":"null"}}},{"type":"object","additionalProperties":false,"required":["type_name","arcs"],"properties":{"type_name":{"const":"object_identifier"},"arcs":{"type":"array","minItems":2,"maxItems":32,"items":{"type":"string","minLength":1,"maxLength":48,"pattern":"^(0|[1-9][0-9]*)$"}}}},{"type":"object","additionalProperties":false,"required":["type_name","text"],"properties":{"type_name":{"const":"utf8_string"},"text":{"type":"string","maxLength":256}}},{"type":"object","additionalProperties":false,"required":["type_name","text"],"properties":{"type_name":{"const":"numeric_string"},"text":{"type":"string","maxLength":256}}},{"type":"object","additionalProperties":false,"required":["type_name","text"],"properties":{"type_name":{"const":"printable_string"},"text":{"type":"string","maxLength":256}}},{"type":"object","additionalProperties":false,"required":["type_name","text"],"properties":{"type_name":{"const":"ia5_string"},"text":{"type":"string","maxLength":256}}},{"type":"object","additionalProperties":false,"required":["type_name","text"],"properties":{"type_name":{"const":"utc_time"},"text":{"type":"string","maxLength":256}}},{"type":"object","additionalProperties":false,"required":["type_name","text"],"properties":{"type_name":{"const":"generalized_time"},"text":{"type":"string","maxLength":256}}},{"type":"object","additionalProperties":false,"required":["type_name","text"],"properties":{"type_name":{"const":"visible_string"},"text":{"type":"string","maxLength":256}}}]},"output_schema":{"type":"object","additionalProperties":false,"required":["der_hex"],"properties":{"der_hex":{"type":"string","minLength":4,"maxLength":4096,"pattern":"^(?:[0-9a-f]{2})*$"}}},"examples":[{"input":{"type_name":"null"},"output":{"der_hex":"0500"}},{"input":{"type_name":"boolean","boolean":true},"output":{"der_hex":"0101ff"}},{"input":{"type_name":"object_identifier","arcs":["2","999","3"]},"output":{"der_hex":"0603883703"}}],"execute_url":"/v1/tools/asn1-der-primitive-encode/versions/1.0.0/execute"}