Methods used in message transmission security
This article lists all methods that are used for encoding and decoding a message, signing a message and validating the signature, and encrypting and decrypting a message.
Encoding related methods
A method that encodes the binary data to the UTF-8-encoded text string.
A method that implements the Base64 encoding algorithm as specified in RFC 3548. It encodes the arbitrary binary data to the text strings that can be safely used as parts of URLs, or included as part of an HTTP POST request.
Decoding related methods
A method that implements the Base64 decoding algorithm as specified in RFC 3548. It decodes the text string that is encoded by using the
base64urlsafe_encode method to the original binary data.
Signature related methods
A method that uses a private key to generate a signature based on the input data. It firstly calculates the hash over the data by using the SHA256 function, then pads the hash by using the RSASSA-PKCS1-v1_5 signature schema, and finally implements encryption by using the RSA algorithm.
A method that validates whether the content string to be validated matches the signature that is generated with
Encryption related methods
This method encrypts message by using AES (Advanced Encryption Standard). For more information about AES, see ISO/IEC 18033-3: Block ciphers.
Decryption related methods
A method that decrypts the cipher text that is encrypted by using AES.