Ask HN: 15 lines of code to represent yourself
1 comments
Never done before, but this is roughly what is currently in my clipboard:
function digest(s) --return crc32(s)..adler32(s) --return hmac_sha1(pass,s) return sha1(s) end
function phe_encode(s) t = {} for i = 1, #s do t[i] = digest(s:sub(1,i)) end return t end
function digest(s) --return crc32(s)..adler32(s) --return hmac_sha1(pass,s) return sha1(s) end
function phe_encode(s) t = {} for i = 1, #s do t[i] = digest(s:sub(1,i)) end return t end
Is this something you've had to do before, if so, what did you send?