Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

More Books

Students also viewed these Databases questions

Question

We are doing better in both overall sales and in profits.

Answered: 1 week ago

Question

That is either a mistake or was an intentional omission.

Answered: 1 week ago