In all of the examples, string literals are used. However these will typically be custom fields in a real templating implementation e.g. <$eval md5(email)$>. In addition, in a template, these functions would need to be inside an <$if$> or <$eval$> tag. These tags have been omitted from this page for clarity.
MD5
Returns the MD5 hash of the string, lower case (i.e. the hash is lower case; the string is hashed as-is).
Usage
- md5(S)
- S MD5
- MD5 S
Examples
- md5(“phil@feedblitz.com”) – returns “21b90d1001aaf5ac72c6f78c92168477”
- MD5 “phil@feedblitz.com” – returns “21b90d1001aaf5ac72c6f78c92168477”
- “phil@feedblitz.com” MD5 – returns “21b90d1001aaf5ac72c6f78c92168477”
if you want to salt a hash, all you need to do is this:
- <$eval md5(“hashstring” email)$>, or
- <$eval “hashstring” email md5 $>
The strings “hashstring” and the value of “email” are concatenated in both versions, then the MD5 hash is derived, returned in lower case.
SHA1
Returns the SHA1 hash of the string, lower case (i.e. the hash is lower case; the string is hashed as-is).
Usage
- sha1(S)
- S sha1
- sha1 S
Examples
- sha1(“phil@feedblitz.com”) – returns “dd8062ccbec29c239d24b691d3d4cab43b4b289e”
- “phil@feedblitz.com” sha1 – returns “dd8062ccbec29c239d24b691d3d4cab43b4b289e”
- sha1 “phil@feedblitz.com” – returns “dd8062ccbec29c239d24b691d3d4cab43b4b289e”
if you want to salt a hash, all you need to do is this:
- <$eval sha1(“hashstring” email)$>, or
- <$eval “hashstring” email sha1$>
The strings “hashstring” and the value of “email” are concatenated in both versions, then the hash is derived, returned in lower case.
SHA256
SHA256 hash of the string, lower case (i.e. the hash is lower case; the string is hashed as-is).
Usage
- sha256(S)
- sha265 S
- S sha 256
Examples
- sha256(“phil@feedblitz.com”) – returns “f7aa0ad60020b5c4782e2cef5e3282ef5c9bec593f30fafaf67cc54309f1b282”
- sha256 “phil@feedblitz.com” – returns “f7aa0ad60020b5c4782e2cef5e3282ef5c9bec593f30fafaf67cc54309f1b282”
- “phil@feedblitz.com” sha256 – returns “f7aa0ad60020b5c4782e2cef5e3282ef5c9bec593f30fafaf67cc54309f1b282”
if you want to salt a hash, all you need to do is this:
- <$eval sha256(“hashstring” email)$>, or
- <$eval “hashstring” email sha256$>
The strings “hashstring” and the value of “email” are concatenated in both versions, then the hash is derived, returned in lower case.
Base64
Returns the basce64 encoded version of the string, S. Important: Encoding is not encryption. Base64 can be used to “safely” transfer data across the internet, and it looks to people as “gobbledygook” – but it is effectively plaintext made safe for Internet transfer. It is an unsafe way to move PII or pass PII as parameters to webhooks,
Usage
- Base64(S)
- Base64 S
- S Base64
Examples
- “phil@feedblitz.com” base64 – returns “cGhpbEBmZWVkYmxpdHouY29t”
- base64 “phil@feedblitz.com” – returns “cGhpbEBmZWVkYmxpdHouY29t”
- base64(“phil@feedblitz.com”) – returns “cGhpbEBmZWVkYmxpdHouY29t”
Base64Decode
The opposite of Base64!
Usage
- base64decode(S)
- base64decode S
Examples
- base64decode “cGhpbEBmZWVkYmxpdHouY29t” – returns “phil@feedblitz.com”
- base64(“cGhpbEBmZWVkYmxpdHouY29t”) – returns “phil@feedblitz.com”