{"id":"pem-envelope-parse","version":"1.0.0","description":"Parse one RFC 7468 textual envelope into its label and lowercase hex bytes.","supported_operations":["parse one pem textual envelope","read rfc 7468 begin and end boundaries","pem armor block to lowercase hex","extract the label from a pem message","decode a pem payload to raw hex bytes","turn pem encapsulation into bytes"],"unsupported_operations":["verify a signature or certificate inside the payload","parse several pem blocks from one bundle","skip explanatory prose before the begin line","decrypt an encrypted private key"],"semantics":["One Figure 1 textualmsg (RFC 7468 section 3). The pre-encapsulation boundary is \"-----BEGIN \", a label, \"-----\", optional SP/HTAB, then CR, LF, or CRLF.","The same label, compared case-sensitively, must appear on the post-encapsulation boundary. A mismatch is invalid_input with details.reason \"label_mismatch\"; labels are not aliased or case-folded.","Whitespace accepted from Figure 1 only: SP and HTAB are ignored throughout the encoded text, including between base64 characters; CR, LF, and CRLF delimit lines. VT and FF are rejected. Explanatory text before BEGIN is extraneous_text, not skipped.","Base64 is RFC 4648 section 4 with required padding and zero unused bits. The decoded payload is lowercase hex. Empty payload is zero bytes. The bytes are not parsed as ASN.1, a certificate, or a key.","Generators' canonical form (Figure 3) is 64-character lines, no extra whitespace, and LF or CRLF throughout, including the line after END. canonical is true only when the input equals that rendering for the detected lf or crlf ending.","Each label is at most 64 bytes, an implementation bound RFC 7468 does not impose. A longer label is limit_exceeded before the payload is decoded. Text above 8192 UTF-8 bytes is limit_exceeded before parsing.","Disclaimer: format transform only; provides no confidentiality, integrity, or authenticity."],"limits":{"max_text_bytes":8192,"max_label_bytes":64,"max_output_bytes":16384},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["text"],"properties":{"text":{"type":"string","minLength":0,"maxLength":8192}}},"output_schema":{"type":"object","additionalProperties":false,"required":["label","bytes_hex","byte_length","canonical","eol"],"properties":{"label":{"type":"string","minLength":0,"maxLength":64,"pattern":"^(?:[\\x21-\\x2C\\x2E-\\x7E](?:[ \\x2D]?[\\x21-\\x2C\\x2E-\\x7E])*)?$"},"bytes_hex":{"type":"string","minLength":0,"maxLength":16384,"pattern":"^(?:[0-9a-f]{2})*$"},"byte_length":{"type":"integer","minimum":0,"maximum":8192},"canonical":{"type":"boolean"},"eol":{"type":"string","enum":["lf","crlf","cr","mixed"]}}},"examples":[{"input":{"text":"-----BEGIN EXAMPLE-----\nAA==\n-----END EXAMPLE-----\n"},"output":{"label":"EXAMPLE","bytes_hex":"00","byte_length":1,"canonical":true,"eol":"lf"}},{"input":{"text":"-----BEGIN EXAMPLE-----\n-----END EXAMPLE-----\n"},"output":{"label":"EXAMPLE","bytes_hex":"","byte_length":0,"canonical":true,"eol":"lf"}},{"input":{"text":"-----BEGIN EXAMPLE-----\nAA== \n-----END EXAMPLE-----\n"},"output":{"label":"EXAMPLE","bytes_hex":"00","byte_length":1,"canonical":false,"eol":"lf"}}],"execute_url":"/v1/tools/pem-envelope-parse/versions/1.0.0/execute"}