summaryrefslogtreecommitdiff
path: root/docs-src
diff options
context:
space:
mode:
Diffstat (limited to 'docs-src')
-rw-r--r--docs-src/content/functions/crypto.yml98
1 files changed, 98 insertions, 0 deletions
diff --git a/docs-src/content/functions/crypto.yml b/docs-src/content/functions/crypto.yml
index de64a8d8..d1778c67 100644
--- a/docs-src/content/functions/crypto.yml
+++ b/docs-src/content/functions/crypto.yml
@@ -27,6 +27,104 @@ funcs:
- |
$ gomplate -i '{{ crypto.Bcrypt 4 "foo" }}
$2a$04$zjba3N38sjyYsw0Y7IRCme1H4gD0MJxH8Ixai0/sgsrf7s1MFUK1C
+ - name: crypto.DecryptAES
+ description: |
+ Decrypts the given input using the given key. By default,
+ uses AES-256-CBC, but supports 128- and 192-bit keys as well.
+
+ _Note: This function is compatible with Helm's encryptAES function, when
+ the input is base64-decoded, and when using 256-bit keys._
+ pipeline: true
+ arguments:
+ - name: key
+ required: true
+ description: the key to use for decryption
+ - name: keyBits
+ required: false
+ description: the key length to use - defaults to `256`
+ - name: input
+ required: true
+ description: the input to decrypt
+ examples:
+ - |
+ $ gomplate -i '{{ base64.Decode "Gp2WG/fKOUsVlhcpr3oqgR+fRUNBcO1eZJ9CW+gDI18=" | crypto.DecryptAES "swordfish" 128 | conv.ToString }}'
+ hello world
+ - name: crypto.DecryptAES
+ description: |
+ Decrypts the given input using the given key. By default,
+ uses AES-256-CBC, but supports 128- and 192-bit keys as well.
+
+ This function prints the output as a string. Note that this may result in
+ unreadable text if the decrypted payload is binary. See
+ [`crypto.DecryptAESBytes`](#crypto.DecryptAESBytes) for another method.
+
+ This function is suitable for decrypting data that was encrypted by
+ Helm's `encryptAES` function, when the input is base64-decoded, and when
+ using 256-bit keys.
+ pipeline: true
+ arguments:
+ - name: key
+ required: true
+ description: the key to use for decryption
+ - name: keyBits
+ required: false
+ description: the key length to use - defaults to `256`
+ - name: input
+ required: true
+ description: the input to decrypt
+ examples:
+ - |
+ $ gomplate -i '{{ base64.Decode "Gp2WG/fKOUsVlhcpr3oqgR+fRUNBcO1eZJ9CW+gDI18=" | crypto.DecryptAES "swordfish" 128 }}'
+ hello world
+ - name: crypto.DecryptAESBytes
+ description: |
+ Decrypts the given input using the given key. By default,
+ uses AES-256-CBC, but supports 128- and 192-bit keys as well.
+
+ This function outputs the raw byte array, which may be sent as input to
+ other functions.
+
+ This function is suitable for decrypting data that was encrypted by
+ Helm's `encryptAES` function, when the input is base64-decoded, and when
+ using 256-bit keys.
+ pipeline: true
+ arguments:
+ - name: key
+ required: true
+ description: the key to use for decryption
+ - name: keyBits
+ required: false
+ description: the key length to use - defaults to `256`
+ - name: input
+ required: true
+ description: the input to decrypt
+ examples:
+ - |
+ $ gomplate -i '{{ base64.Decode "Gp2WG/fKOUsVlhcpr3oqgR+fRUNBcO1eZJ9CW+gDI18=" | crypto.DecryptAES "swordfish" 128 }}'
+ hello world
+ - name: crypto.EncryptAES
+ description: |
+ Encrypts the given input using the given key. By default,
+ uses AES-256-CBC, but supports 128- and 192-bit keys as well.
+
+ This function is suitable for encrypting data that will be decrypted by
+ Helm's `decryptAES` function, when the output is base64-encoded, and when
+ using 256-bit keys.
+ pipeline: true
+ arguments:
+ - name: key
+ required: true
+ description: the key to use for encryption
+ - name: keyBits
+ required: false
+ description: the key length to use - defaults to `256`
+ - name: input
+ required: true
+ description: the input to encrypt
+ examples:
+ - |
+ $ gomplate -i '{{ "hello world" | crypto.EncryptAES "swordfish" 128 | base64.Encode }}'
+ MnRutHovsh/9JN3YrJtBVjZtI6xXZh33bCQS2iZ4SDI=
- name: crypto.PBKDF2
description: |
Run the Password-Based Key Derivation Function #2 as defined in