15 lines
528 B
Text
15 lines
528 B
Text
$ zkl // run the REPL
|
|
zkl: var MsgHash=Import("zklMsgHash")
|
|
MsgHash
|
|
zkl: MsgHash.SHA1("Rosetta Code")
|
|
48c98f7e5a6e736d790ab740dfc3f51a61abe2b5
|
|
|
|
zkl: var hash=MsgHash.SHA1("Rosetta Code",1,False) // hash once, return hash as bytes
|
|
Data(20)
|
|
zkl: hash.bytes()
|
|
L(72,201,143,126,90,110,115,109,121,10,183,64,223,195,245,26,97,171,226,181)
|
|
zkl: hash.bytes().apply("toString",16).concat()
|
|
48c98f7e5a6e736d79ab740dfc3f51a61abe2b5
|
|
|
|
zkl: MsgHash.SHA1("a"*1000,1000); // hash 1000 a's 1000 times
|
|
34aa973cd4c4daa4f61eeb2bdbad27316534016f
|