Encoding

The Encoding library adds blocks that can preform Encoding, Hashing, and Encryption algorithms.

This library was made for educational purposes only, and is not 100% secure. Please do not depend on this library for the secure transmission of data.

Encoding
Encoding is a means to convert data in one form to another. This does not keep the data secret since it is easy to decode encoded data.

Supported Encoding schemes:

Example
encode Hello World with morse This blocks returns ".... . .-.. .-.. --- / .-- --- .-. .-.. -.. "

Hashing
Hashing is a one way function that outputs a value that represents the input. Message Digest (MD) algorithms are fast, but are not secure. Use a Secure Hash Algorithm (SHA) along with a salt for cryptographic applications.

Supported Algorithms:

Example
hash Hello world with MD5 This script returns "3e25960a79dbc69b674cd4ec67a72c62"

Salted hashes
Common hashes are vulnerable to rainbow table attacks. By searching though a database of common strings, it becomes easy to reverse a common hash. Salted hashes boost the security of hashes. By adding a random string called a salt to the beginning of a string before computing it's hash, rainbow table attacks become ineffective if a different salt is used for each hash.

Example
hash join SALT monkey SHA256

Encryption
Encryption is a means to create secret messages in a way such that it can only be read by people who have the secret key.

Symmetric Encryption Example
encrypt Hello world with AES and key 12345 This block returns the string "U2FsdGVkX1/k1AF3lKSUMq5sWEPm/R68xtPAKVssAI4=" decrypt U2FsdGVkX1/k1AF3lKSUMq5sWEPm/R68xtPAKVssAI4= with AES and key 12345 This block returns the string "Hello World" since it uses the same key: "12345"

Asymmetric Encryption
Asymmetric encryption uses one key for encryption and another for decryption

generate new RSA key pair 256     set cipher_text to        encrypt Hello world with RSA and key RSA encryption key set plain_text to        decrypt cipher_text with RSA and key RSA decryption key The first block generates a 256 bit RSA key pair.

The second blocks encrypts the message "Hello world" with the encryption key, storing the result in the variable "cipher_text"

The third blocks decrypts the "cipher_text" with the encryption key's linked decryption key, resulting in "Hello world"

The Blocks
† Depending on the speed of your computer, this process can take up to a few minutes for a large key. This key is stored on the user's computer, and should remain secure as long as the private key is undisclosed.