PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 25 → HASH Windev
HASH Windev
Started by Willian Fernando, Jun., 01 2016 10:07 PM - 1 reply
Registered member
123 messages
Popularité : +46 (46 votes)
Posted on June, 01 2016 - 10:07 PM
para Gerar um HASH


hash_inicial is Buffer
hash_inicial = HashString(HA_HMAC_MD5_128, "abc") //Exemplo MD5

hash_esperado is string
FOR nChar=1 TO Length(hash_inicial)
hash_esperado += NumToString(Asc(hash_inicial[[nChar]]),"02x")
END
//no final hash_esperado vai conter o resultado


Copyright = Tom Silva

--
Atte. Willian Fernando
Message modified, June, 01 2016 - 10:10 PM
Registered member
123 messages
Popularité : +46 (46 votes)
Posted on June, 01 2016 - 10:43 PM
Correção

hash_inicial is Buffer
hash_inicial = HashString(HA_MD5_128, "abc") //Exemplo MD5 deve-se usar HA_MD5_128

hash_esperado is string
FOR nChar=1 TO Length(hash_inicial)
hash_esperado += NumToString(Asc(hash_inicial[[nChar]]),"02x")
END


--
Atte. Willian Fernando