diff options
author | Matthew Wild <mwild1@gmail.com> | 2022-03-04 16:33:41 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2022-03-04 16:33:41 +0000 |
commit | b47c7951d54d64a3a89854bb80f5d67cc2da90ab (patch) | |
tree | 916354af1f314292b4410e1febcfe6a71e398cf0 /spec/util_hashes_spec.lua | |
parent | b6bf4788aa3d5c7ee847c690fcd0fbd9346a5dc7 (diff) | |
parent | a6265e45a04a7f7d5ae39c5608f7a350be1410db (diff) | |
download | prosody-b47c7951d54d64a3a89854bb80f5d67cc2da90ab.tar.gz prosody-b47c7951d54d64a3a89854bb80f5d67cc2da90ab.zip |
Merge config-updates+check-turn from timber
Diffstat (limited to 'spec/util_hashes_spec.lua')
-rw-r--r-- | spec/util_hashes_spec.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/util_hashes_spec.lua b/spec/util_hashes_spec.lua index 3639dd4e..51a4a79c 100644 --- a/spec/util_hashes_spec.lua +++ b/spec/util_hashes_spec.lua @@ -10,28 +10,28 @@ describe("PBKDF2-HMAC-SHA1", function () local S = "salt" local c = 1 local DK = "0c60c80f961f0e71f3a9b524af6012062fe037a6"; - assert.equal(DK, hex.to(hashes.pbkdf2_hmac_sha1(P, S, c))); + assert.equal(DK, hex.encode(hashes.pbkdf2_hmac_sha1(P, S, c))); end); it("test vector 2", function () local P = "password" local S = "salt" local c = 2 local DK = "ea6c014dc72d6f8ccd1ed92ace1d41f0d8de8957"; - assert.equal(DK, hex.to(hashes.pbkdf2_hmac_sha1(P, S, c))); + assert.equal(DK, hex.encode(hashes.pbkdf2_hmac_sha1(P, S, c))); end); it("test vector 3", function () local P = "password" local S = "salt" local c = 4096 local DK = "4b007901b765489abead49d926f721d065a429c1"; - assert.equal(DK, hex.to(hashes.pbkdf2_hmac_sha1(P, S, c))); + assert.equal(DK, hex.encode(hashes.pbkdf2_hmac_sha1(P, S, c))); end); it("test vector 4 #SLOW", function () local P = "password" local S = "salt" local c = 16777216 local DK = "eefe3d61cd4da4e4e9945b3d6ba2158c2634e984"; - assert.equal(DK, hex.to(hashes.pbkdf2_hmac_sha1(P, S, c))); + assert.equal(DK, hex.encode(hashes.pbkdf2_hmac_sha1(P, S, c))); end); end); @@ -41,14 +41,14 @@ describe("PBKDF2-HMAC-SHA256", function () local S = "salt"; local c = 1 local DK = "120fb6cffcf8b32c43e7225256c4f837a86548c92ccc35480805987cb70be17b"; - assert.equal(DK, hex.to(hashes.pbkdf2_hmac_sha256(P, S, c))); + assert.equal(DK, hex.encode(hashes.pbkdf2_hmac_sha256(P, S, c))); end); it("test vector 2", function () local P = "password"; local S = "salt"; local c = 2 local DK = "ae4d0c95af6b46d32d0adff928f06dd02a303f8ef3c251dfd6e2d85a95474c43"; - assert.equal(DK, hex.to(hashes.pbkdf2_hmac_sha256(P, S, c))); + assert.equal(DK, hex.encode(hashes.pbkdf2_hmac_sha256(P, S, c))); end); end); |