Index: doc/tls.html ================================================================== --- doc/tls.html +++ doc/tls.html @@ -456,10 +456,11 @@ (default) or as a binary value with -bin option. Using -chan option, a stacked channel is created and data read from the channel is used to calculate a message digest with the result returned with the last read operation before EOF. Use -key to specify the key and return a Hashed Message Authentication Code (HMAC). + To salt a password, append or prepend the salt text to the password. Type can be any OpenSSL supported hash algorithm including: md4, md5, sha1, sha256, sha512, sha3-256, etc. See tls::digests command for a full list.
tls::digests
Index: generic/tlsDigest.c ================================================================== --- generic/tlsDigest.c +++ generic/tlsDigest.c @@ -1,5 +1,6 @@ + /* * Digest Command and Stacked Transform Channel * * Copyright (C) 2023 Brian O'Hagan * Index: tests/ciphers.test ================================================================== --- tests/ciphers.test +++ tests/ciphers.test @@ -224,11 +224,11 @@ test Digest_HMAC-10.2 {file} -body { tls::digest md5 -key "Example key" -file md_data.dat } -result {901DA6E6976A71650C77443C37FF9C7F} -test Digest_HMAC-10.3 {channel} -constraint {knownBug} -body { +test Digest_HMAC-10.3 {channel} -constraints {knownBug} -body { read_chan md5 md_data.dat -key "Example key" } -result {901DA6E6976A71650C77443C37FF9C7F} test Digest_HMAC-10.4 {data bin} -body { string toupper [binary encode hex [tls::digest md5 -bin -key "Example key" -data "Example string for message digest tests."]]