-->

Azure Keyvault Sign API - Request body “value” enc

2019-08-25 04:02发布

问题:

Referring to the Azure keyvault Sign API at https://docs.microsoft.com/en-us/rest/api/keyvault/sign/sign. Its not clear if the "value" which is string (in request and response both), how the API expects the encoding for binary strings like digest and how the response has this 'value' encoded? Is this in base64? If so, Azure has any difference in base64? Any sample code showing this REST API request/response processing?

回答1:

For the Sign API, the value is a digest. This page tells that it needs to be base64url encoded, and conforming to JOSE specifications. The actual value will vary according to the signing algorithm. Links to libraries and sample code in many programming languages can be found here.