1
0
Fork 0
mirror of https://github.com/in3rsha/sha256-animation synced 2024-05-03 22:26:13 +02:00

added note

This commit is contained in:
Greg Walker 2021-04-13 13:13:55 +01:00
parent 76583eb13d
commit 9f431b581f

View File

@ -48,6 +48,8 @@ primes.each do |prime|
#
# Hex: 428a2f98
#
# In other words, you multiply the fractional part by 2^32, floor it, then convert to hexadecimal.
#
hex = ""
8.times do # 32 bits = 8 hex characters
product = fractional * 16 # multiply fraction by 16