chickadee » crypto-tools » blob-pkcs5-pad

blob-pkcs5-pad BLOB SIZEprocedure

Given a blob of at most SIZE-1 bytes, and a desired size, returns a blob of SIZE bytes by appending padding to the end of the input blob. The padding is a byte with a value of how many bytes comprise the pad. Conforms to ISO7816-4.