I am interested in taking an existing hash and resuming the SHA256 encryption from that point. It seems doable in C++:
This is what I have tried:
irb(main):007:0> sha2 = Digest::SHA2.new => #<Digest::SHA2:256 e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855>
irb(main):008:0> sha2 << "string1"
=> #<Digest::SHA2:256 93fedde43203e0a76172135221b8636313635d7afff96a490ae9066330505d47>
irb(main):009:0> sha2 << "string2"
=> #<Digest::SHA2:256 bac09aa72e632e76c36e6c1c4e502b73c3da7fca68c475273dc5517815587cc4>
irb(main):010:0>
The above code updates the SHA2 digest object, in session. I want to start a new session...lets call it newshaw2 by assigning the same original hash as created when I passed String1 to sha2, as above.
I want to "make" newshaw2 as the object 93fedde43203e0a76172135221b8636313635d7afff96a490ae9066330505d47.
Setting it equal: newshaw2 = '93fedde43203e0a76172135221b8636313635d7afff96a490ae9066330505d47' just makes this a string object, not a digest.
Once, I have successfully assigned newsha2 with the hash then I would update with string2 to resume the hashing process.