[KMS]Signing a digest message with ECDSA_SHA_256 #571
-
Hi, I am trying to test the signing with aws_sdk_kms.
The source code I am testing is like
Could you tell me what the right way to handle a digest message with Blob is? ==== Soon after posting the above question, I realized that the digest message should've handled as at the beginning. I mean, it needs to be converted as binary from hex, not text. Am I right? Sorry, this question could be such a basic question.... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hello! However, if you're computing the Digest in Rust, you can just pass the We ran into a very similar issue during our own development of S3 Flexible Checksums—@Velfi may have a code snippet to direct you to |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
Hello!
digest.as_bytes()
is giving you the bytes of the ascii string (which are different from the actual bytes)—you'd need to hex-decode the digest to use it. Does that make sense? (eg. https://docs.rs/hex/0.4.3/hex/fn.decode.html)However, if you're computing the Digest in Rust, you can just pass the
Vec<u8>
toBlob
directlyWe ran into a very similar issue during our own development of S3 Flexible Checksums—@Velfi may have a code snippet to direct you to