Answer the question
In order to leave comments, you need to log in
Why am I getting a non-standard result when defining constants for SHA-256?
from math import sqrt
fractional_part = int(str(sqrt(2)).split('.')[1]) # получение дробной части кв. корня из 2
binary_32 = bin(fractional_part)[2:34] # получение первых 32 битов из fractional_part
for_hex = int(binary_32, 2) # hex не принимает недесятичные числа
print(hex(for_hex) == '0x6a09e667') # -> False
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question