Question
I am working in C++ and I have a hex character array of 40, which is populated by a SHA1 function (returns 40 characters). Now
I am working in C++ and I have a hex character array of 40, which is populated by a SHA1 function (returns 40 characters). Now I need to remove the first 20 bits of it, and then be able to work with that output to try and find what was removed. I can't figure out how to modify the return SHA1 characters to remove half a character (nibble) (4 bits) and 2 full characters. The code to get this hash/character array is as follows:
SHA1((unsigned char*)ibuf.c_str(), ibuf.size(), hash);
Where hash is an unsigned character array of size 40 characters. I want to remove the first two characters and the first nibble of the third character. But store it in a string that I can send to another function. I then need to know how to work with/add onto the nibble to reconstruct the third character, and then try and find the other two (first characters).
Step 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