Question
Python question: Write a function, named Q2, that takes a strictly positive int input, T, and outputs a str, s, such that Int(Hex(H(Encode(s)))) The input
Python question: Write a function, named Q2, that takes a strictly positive int input, T, and outputs a str, s, such that Int(Hex(H(Encode(s))))
The input 2 ** 256 is supposed to return 'any string'. I'm confused as to how to convert any positive input into a string that will give us a legible output. \
2 ** 255 is supposed to return 'abcdefghijklmn'
Let H represent the SHA256 hash function, mapping from the space of arbitrarily large bits into to the space of 256 bits. Let Encode represents a function that maps a string into the space of arbitrarily long bits. Let Hex represent a function that maps the space of arbitrarily long bits into hexidecimal format. Let Int represent a function that maps a hexidecimal string into an integer value determined by interpreting the input as a base 16 number.
Question 2 Write a function, named Q2, that takes a strictly positive int input, T, and outputs a str, s, such that Int(Hex(H(Encode(s)))) TStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started