The digest is a base64 encoded hash of the body: Base64(SHA512(body))
- Take the body of your request or an empty string if there is no body.
- Pass the body through the SHA512 hashing algorithm (SHA256 is also allowed).
- Make sure the hashed output is binary. In other words; do not convert it to a string.
- Base64 encode the output.
- Add the result to your Digest header and make sure that you declare which hashing algorithm you have used.
An example of the digest header for an empty body using SHA256 or SHA512:
Digest: SHA-256=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=
Digest: SHA-512=z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXcg/SpIdNs6c5H0NE8XYXysP+DGNKHfuwvY7kxvUdBeoGlODJ6+SfaPg==
For more information about siging read Signing requests for Rabobank APIs