Module:RadioGatun32/testcases

local RadioGatun = {} -- These test vectors come from -- http://radiogatun.noekeon.org/RadioGatun-ReferenceCodeAndTestVectors.zip RadioGatun[""]="F30028B54AFAB6B3E55355D277711109A19BEDA7091067E9A492FB5ED9F20117" RadioGatun["0"]="AF0D3F51B98E90EEEBAE86DD0B304A4003AC5F755FA2CAC2B6866A0A91C5C752" RadioGatun["1"]="896C580EF77A68C36B040DCD5A650C09B8B5D915ECE298AD0210A21ED5811C95" RadioGatun["2"]="070182313AB302CFC82459786F4A30EC66260C6676495CE86E72B3BE7C60F7AD" RadioGatun["3"]="E1D20A1B67028A7C102CF77B444E0F4D8489F95506C76E4F27CE43D4958810AD" RadioGatun["4"]="2D438E83A3D99929F44A1B0AB5A994EB4ABDFE11F9E72D62DE925BF120CAFCCD" RadioGatun["5"]="8C3C9529C6CC4D266760670F38C7470D6ABA5A0905170A3692AE87E4ABF291FB" RadioGatun["6"]="904573304A5BC7BA040F8DEF9EECA4138F7DDD7DA30E4B8FB97B7F6E06076BED" RadioGatun["7"]="E7195ED9189C0169C90AFFEEFCF8810627DB1607F394FB13C7B43D06C74B1D4B" RadioGatun["8"]="54E7013E72D94B31324D4878F91AE19A7085F20EFE9DAAB96A1FE559C78AE825" RadioGatun["9"]="D4D08F6612F8EB58A855B2F5AABFC504E2972BA829DA94EDD960193D18BAD8D1" RadioGatun["12"]="A7FDB34FD5D85D564A62C0B1B1B60CFA3D7A0C778231C95CDCD9BD293CCA16C6" RadioGatun["123"]="57364D849286C7B3E98F3FC898094F7DC1675BA881A620B75D70F39631A4AA5B" RadioGatun["1234"]="9EBDD24F469993796C4AAC6A821735A65A3CDEF8A359944CE71F34E7A08E1182" RadioGatun["12345"]="B333C8413087FA49882BBD4F76A9223C4AA633A252514852C3F7C0C5F8F4D87B" RadioGatun["123456"]="862B75D2E8E7F08F93812168502AF97BCE530C66688D4372A08EEA0951B5024A" RadioGatun["1234567"]="90B7061A244CE7FBA80F9813787CB90EC3FBB3398AEE740AF1C0D44BC5282B73" RadioGatun["12345678"]="E69E29BA139C20846116D8AD406E6197F1701D8243CC53BB86F2B72C62320A39" RadioGatun["123456789"]="D77629174F56D8451F73CBE80EC7A20EF2DD65C46A1480CD004CBAA96F3FA1FD" RadioGatun["1234567890"]="4F88759143CD9D11F6DE8DA4D3724C36C745223A5CFB7AD0E74DA87C80A43326" RadioGatun["12345678901"]="5FC6C16C29CDD2EF78EE4F3C864C1942A052C110FD5A9711FE9BCF953A2D2D5B" RadioGatun["123456789012"]="15EDA58156CA398AF49CBE9C9E62BF036A66B303ACB0043FB57ECADF9E9C8EDA" RadioGatun["1234567890123"]="99F13E01DBF89E6BBF60C87E99F4F18C851D3385D9B5A1678C705E8F31F70B84" RadioGatun["12345678901234"]="0AC434523B00F5C3D1D2AEEDBAE851D3EEAF3D76963CFD70A8B1D875638C8CD4" RadioGatun["123456789012345"]="0EC6EAE7879543772B64F320BC5056C81ACE91AEA20F360CEFA57272E2C07197" RadioGatun["1234567890123456"]="59612324F3F42D3096E69125D2733B86143AE668AE9ED561AD785E0EAC8DBA25" RadioGatun["12345678901234567"]="D52161B6BB583955B1ABB5781D2044BE8F4174904241533973C66B87880EDB53" RadioGatun["123456789012345678"]="E42EA26B8B696541CFEA557C47886ED41440A04EF8CCC055CEB6583F6ACF6015" RadioGatun["1234567890123456789"]="687BDEC54F854303E48300A52C9099E3153F481CE34E12CDC178D841C0926B51" RadioGatun["12345678901234567890"]="8BD3D5953ED234F7A0051A993776630A9722978D06240EECC66E05A0B2CB60C7" RadioGatun["123456789012345678901"]="381957046BEC1DFC08EAA0B2818D9FA07BCF78386C43AA41C069B5CF33E4F9AB" RadioGatun["1234567890123456789012"]="F769558AF4FB0ACB6643B893D3595C2E5B110C60256D1CEB672EB33999EF0887" RadioGatun["12345678901234567890123"]="4CAE588C3F3C08DF85564379332309EA5F73A51405CD4408C9DBFFF1615EF297" RadioGatun["123456789012345678901234"]="4884DACCBDA87F1E02814152F0224DAB291B49FFD86516A30EA6C9D546730ECF" local p = {} function p.test local rg32 = require("Module:RadioGatun32") for k,v in pairs(RadioGatun) do		if rg32.rg32sum(k) ~= v then return("Test vector " .. k .. " failed. Expected " .. v .. " got " .. rg32.rg32sum(k)) end end return("All RadioGatun[32] test vectors pass") end return p