Bitcoin/public point to address: Difference between revisions

m
rev4 now in sha256.e
m (rev4 now in sha256.e)
Line 456:
end function
function rev4(string s)
string res = ""
for i=1 to length(s)-3 by 4 do
for j=i+3 to i by -1 do
res &= s[j]
end for
end for
return res
end function
 
function coin_encode(string x, y)
if length(x)!=32
Line 472 ⟶ 462:
end if
string s = "\x04" & x & y
string rmd = '\0'&ripemd160(rev4(sha256(s)),false)
rmd &= rev4(sha256(rev4(sha256(rmd))))[1..4]
string res = base58(rmd)
return res
7,815

edits