What is 05 in hex

61 Views Asked by At

I'm using the Node-Forge library for AES encryption. I know AES needs to be padded to the ceiling of the block size. Node-Forge uses the hex code 05 for padding. What is this code, and how should I unpad the message?

Right now I'm doing something like this:

Encrypt message "hello world"
Output: e20bf1586a94082707b8dfcf26d70ea5

Decrypted output: 68656c6c6f20776f726c640505050505
Output.replaceAll("05", "")
New output: 68656c6c6f20776f726c64

68656c6c6f20776f726c64 decoded is "hello world"
0

There are 0 best solutions below