22.16.76. salt.modules.hashutil

A collection of hashing and encoding functions

salt.modules.hashutil.base64_decodestring(instr)

Decode a base64-encoded string

New in version 2014.7.0.

CLI Example:

salt '*' hashutil.base64_decodestring 'Z2V0IHNhbHRlZA==

'

salt.modules.hashutil.base64_encodestring(instr)

Encode a string as base64

New in version 2014.7.0.

CLI Example:

salt '*' hashutil.base64_encodestring 'get salted'
salt.modules.hashutil.hmac_signature(string, shared_secret, challenge_hmac)

Verify a challenging hmac signature against a string / shared-secret

New in version 2014.7.0.

Returns a boolean if the verification succeeded or failed.

CLI Example:

salt '*' hashutil.hmac_signature 'get salted' 'shared secret' 'NS2BvKxFRk+rndAlFbCYIFNVkPtI/3KiIYQw4okNKU8='
salt.modules.hashutil.md5_digest(instr)

Generate an md5 hash of a given string

New in version 2014.7.0.

CLI Example:

salt '*' hashutil.md5_digest 'get salted'
salt.modules.hashutil.sha256_digest(instr)

Generate an sha256 hash of a given string

New in version 2014.7.0.

CLI Example:

salt '*' hashutil.sha256_digest 'get salted'
salt.modules.hashutil.sha512_digest(instr)

Generate an sha512 hash of a given string

New in version 2014.7.0.

CLI Example:

salt '*' hashutil.sha512_digest 'get salted'

Docs for previous releases are available on salt.rtfd.org.

Latest Salt release: 2014.1.13

Try the shiny new release candidate of Salt, v2014.7.0rc6! More info here.

Previous topic

22.16.75. salt.modules.haproxyconn

Next topic

22.16.77. salt.modules.hg

SaltStack News

Upcoming SaltStack events, webinars and local meet ups and user groups.