Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added sha256Hex function #1327

Merged
merged 1 commit into from
Apr 24, 2020
Merged

Conversation

vfoucault
Copy link
Contributor

this will compute the sha256 hash function and output the hex version
of it.

tests and doc updated.

how to use:

{{ "bladibla" | sha256Hex }}

this will output

54cf4c66bcabb5c20e25331c01dd600b73369e97a947861bd8d3a0e0b8b3d70b

@hashicorp-cla
Copy link

hashicorp-cla commented Dec 16, 2019

CLA assistant check
All committers have signed the CLA.

this will compute the sha256 hash function and output the hex verion
of it.

tests and doc updated.
@eikenb eikenb added this to the 0.25.0 milestone Feb 1, 2020
@eikenb
Copy link
Contributor

eikenb commented Feb 1, 2020

Hey @vfoucault, thanks for the PR.

I'll most likely accept this but I'm curious... what is the use case?

@vfoucault
Copy link
Contributor Author

Hey @eikenb, the main goal is to obviously generate sha256 of passwords. I use it in the analytics data named Clickhouse.

<?xml version="1.0"?>
<yandex>
    <users>
        <default>
            <password_sha256_hex>54cf4c66bcabb5c20e25331c01dd600b73369e97a947861bd8d3a0e0b8b3d70b</password_sha256_hex>
            <networks incl="networks" replace="replace">
                <ip>::/0</ip>
            </networks>
            <profile>default</profile>
            <quota>default</quota>
        </default>
    </users>
</yandex>

The password could be also stored in plaintext, but this is less sexy and secure !

@eikenb eikenb merged commit dbcb0c6 into hashicorp:master Apr 24, 2020
@vfoucault vfoucault deleted the func/sha256Hex branch December 30, 2020 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants