Artifact [d620205d39]

Artifact d620205d397f2c9ee95f6b72dace21625cbb836f78b729578bdeccd610e0b409:


# Auto generated from "Scrypt.txt"
lappend auto_path [file dirname [file dirname [file dirname [file dirname [file join [pwd] [info script]]]]]]
package require tls
package require tcltest

tcltest::testConstraint Scrypt [expr {[lsearch -nocase [tls::kdfs] Scrypt] > -1}]
catch {tls::provider legacy}

tcltest::test KDF_Scrypt-1.1 {Scrypt} \
	-constraints {Scrypt } \
	-setup {} \
	-body {binary encode hex [tls::scrypt -password "" -salt "" -size 64 -N 16 -r 1 -p 1]} \
	-match exact -result 77d6576238657b203b19ca42c18a0497f16b4844e3074ae8dfdffa3fede21442fcd0069ded0948f8326a753a0fc81f17e8d3e0fb2e0d3628cf35e20c38d18906

tcltest::test KDF_Scrypt-1.2 {Scrypt} \
	-constraints {Scrypt } \
	-setup {} \
	-body {binary encode hex [tls::scrypt -password "password" -salt "NaCl" -size 64 -N 1024 -r 8 -p 16]} \
	-match exact -result fdbabe1c9d3472007856e7190d01e9fe7c6ad7cbc8237830e77376634b3731622eaf30d92e22a3886ff109279d9830dac727afb94a83ee6d8360cbdfa2cc0640

tcltest::test KDF_Scrypt-1.3 {Scrypt} \
	-constraints {Scrypt } \
	-setup {} \
	-body {binary encode hex [tls::scrypt -password "pleaseletmein" -salt "SodiumChloride" -size 64 -N 16384 -r 8 -p 1]} \
	-match exact -result 7023bdcb3afd7348461c06cd81fd38ebfda8fbba904f8e3ea9b543f6545da1f2d5432955613f0fcf62d49705242a9af9e61e85dc0d651e40dfcf017b45575887

tcltest::test KDF_Scrypt-1.4 {Scrypt} \
	-constraints {Scrypt } \
	-setup {} \
	-body {binary encode hex [tls::scrypt -password "pleaseletmein" -salt "SodiumChloride" -size 64 -N 1048576 -r 8 -p 1]} \
	-match exact -result 2101cb9b6a511aaeaddbbe09cf70f881ec568d574a2ffd4dabe5ee9820adaa478e56fd8f4ba5d09ffa1c6d927c40f4c337304049e8a952fbcbf45c6fa77a41a4

# Cleanup
::tcltest::cleanupTests
return