ASCII Pad Functions
Description. This is a procedure for converting ordinary text (plaintext) to padded ASCII number. It takes as input a sentence written between " and ", it pads each character one after another, and returns the padded characters as a list. It 'pads' by adding 100 to each list item.
Example. Convert the plaintext "Bob, your public key is not secure!" into an ASCII number. Then depad the resulting number.
The padded ASCII version of the plaitext: Bob, your public key is not secure! is 166211198144132221211217214132132212217198208205199132132207201221132205215132210211216132215201199217214201133
The function ASCIIDepad returns the original plaintext Bob, your public key is not secure!
The function isASCIIPadded returns a true false value on whether a given number represents a plaintext.
Example. The function isASCIIPadded is applied to the number 177201215215197203201. It returns "true" value. Next, function isASCIIPadded is applied to the number 177201215215197203701. It returns "false" value.
Plaintext
P
180208197205210216201220216
True
489357392874032984032984011
False