sha256-of-base64

Invicton-Labs/sha256-of-base64/null

Terraform Module HCL NULL
Install
module "sha256-of-base64" {
source = "Invicton-Labs/sha256-of-base64/null"
version = "0.1.0"
}
plain text: /constructs/tfmod-invicton-labs-sha256-of-base64-null/install.txt
⭐ Source on GitHub 📦 Registry page
README

Terraform SHA256 of Base64 This module is functionally equivalent to sha256(base64decode(var.content_base64)) (hex output) and base64sha256(base64decode(var.content_base64)) (base64 output), except that it functions even when content_base64 does not decode to valid UTF-8. This module has been tested on Linux and Windows, but not macOS. In theory, it should function on any Unix-based OS that supports bash, base64, and sha256sum commands, or any Windows-based OS that supports PowerShell. Usage `` locals { // foo is a base64-encoded string of some binary that does not represent valid UTF-8 foo_b64 = "0000" foo_sha256_hex = sha256(base64decode(local.foo_b64)) foo_sha256_b64 = base64sha256(base64decode(local.foo_b64)) } output "sha256_hex" { value = local.foo_sha256_hex } output "sha256_b64" {

Inputs (1)
NameTypeDescriptionDefault
content_base64stringThe base64-encoded content to get the SHA256 hash of. required
Outputs (2)
base64 — The base64-encoded SHA256 hash of the decoded base64 content.
hex — The hex-encoded SHA256 hash of the decoded base64 content. Will always use lower-case letters.
Details
FrameworkTerraform Module
LanguageHCL
Version0.1.0
Cloud NULL
Total downloads449
Inputs1
Outputs2
NamespaceInvicton-Labs
Updated