You could use this, it is really fast, you would just need a function to transform a password into a 32 Byte string. You could use sha256 and take the first 32 bytes.
Edit: Happy new year
Edited by Luca0208, 02 January 2016 - 09:25 AM.
Posted 02 January 2016 - 09:23 AM
Edited by Luca0208, 02 January 2016 - 09:25 AM.
Posted 02 January 2016 - 09:40 AM
Edited by Creator, 02 January 2016 - 09:40 AM.
Posted 02 January 2016 - 07:40 PM
function hashToKey(s)
local r = {}
s = tostring(s)
s = #s%2==1 and s.."0" or s
for b in s:gmatch("%x%x?") do
r[#r+1] = tonumber(b, 16)
end
return r
end
Which outputs into the perfect key format for my Chacha code.Edited by Anavrins, 02 January 2016 - 08:06 PM.
Posted 02 January 2016 - 08:37 PM
Posted 02 January 2016 - 09:06 PM
Edited by Anavrins, 02 January 2016 - 09:09 PM.
Posted 02 January 2016 - 10:21 PM
Posted 02 January 2016 - 10:26 PM
Edited by Anavrins, 02 January 2016 - 10:26 PM.
Posted 02 January 2016 - 11:10 PM
0 members, 1 guests, 0 anonymous users