The spec says here about the hash field: "A Base64 encoding of HMAC(KEY, POLICY)". What the SDK actually does is:
policyBindingHash := hex.EncodeToString(ocrypto.CalculateSHA256Hmac(symKey, base64PolicyObject))
pbstring := string(ocrypto.Base64Encode([]byte(policyBindingHash)))
Note the call to hex.EncodeToString. Because of this, the resulting hash is incompatible with independent 3rd party implementations.
The spec says here about the hash field: "A Base64 encoding of HMAC(KEY, POLICY)". What the SDK actually does is:
Note the call to
hex.EncodeToString. Because of this, the resulting hash is incompatible with independent 3rd party implementations.