Encrypt
This function is an Encryption function in the UBot Extended Library. This function encrypts a value through the following methods provided in the function:
base64: takes a stream of characters and converts them to characters that belong to the universal ASCII character set.What is Base 64 Encoded Data?
md5: produces a 128-bit (16-byte) hash value, typically expressed in text format as a 32 digit hexadecimal number.What All This MD5 Hash Stuff Actually Means [Technology Explained]
sha1: message-digest algorithm, which takes an input message of any length < 2^64 bits and produces a 160-bit output as the message digest.What Is SHA1 Message Digest Algorithm?
sha256: SHA-256 generates an almost-unique 256-bit (32-byte) signature for a text.SHA-256 Cryptographic Hash Algorithm
Value to Encrypt: The value being hashed. (the value PeanutButter in the variable #testvalue)
Cryptography Algorithm: The method by which the value will be hashed.
Example
set(#testvalue,"PeanutButter","Global") add item to list(%base64,$encrypt(#testvalue,"base64"),"Don\'t Delete","Global") add item to list(%md5,$encrypt(#testvalue,"md5"),"Don\'t Delete","Global") add item to list(%sha1,$encrypt(#testvalue,"sha1"),"Don\'t Delete","Global") add item to list(%sha256,$encrypt(#testvalue,"sha256"),"Don\'t Delete","Global")
There are 4 examples in the script above. The resulting has is shown in each list.