tufffta Posted January 16, 2015 Share Posted January 16, 2015 Hello, I am a bit confused by this statement that I found on a sha256 digestvalue calculation here: http://www.w3.org/TR/2002/REC-xmlenc-core-20021210/Overview.html#sha256 A SHA-256 digest is a 256-bit string. The content of the DigestValue element shall be the base64 encoding of this bit string viewed as a 32-octet octet stream. Does that mean that the sha256 hash value has to be converted to a 32-bit string before encoding it to base64? If yes, could someone please tell me how this can be done? I'm a kind of a n00b, but I haven't found info on how to do that on the internet. Link to comment Share on other sites More sharing options...
justsomeguy Posted January 16, 2015 Share Posted January 16, 2015 It says a 32-octet stream, not 32-bit. An octet is a byte, 8 bits. It's grouping the 256 bits into 32 8-bit pieces. Link to comment Share on other sites More sharing options...
tufffta Posted January 19, 2015 Author Share Posted January 19, 2015 Alright, thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now