SignHMACSha256
Given a piece of data and a shared secrect key, calculates an SHA-256 with HMAC signature for the data.
Method Parameters
Parameter | Description |
---|---|
secrectKey | The shared secrect key used to generate the signature |
dataString | The data string to calculate the signature for |
Usage
http://localhost:3000
- C#
- C++
- Objective-C
- Java
- JavaScript
- Dart
- Cloud Code
- Raw
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
// Cloud Code only. To view example, switch to the Cloud Code tab
var secrectKey = "aSecrectKey";
var dataString = "String to sign";
var response = {};
response.signature = bridge.utils().signHMACSha256( secrectKey, dataString );
// Return the result
response;
var secrectKey = "aSecrectKey";
var dataString = "String to sign";
var response = {};
response.signature = bridge.utils().signHMACSha256( secrectKey, dataString );
// Return the result
response;
JSON Response
{
"data": {
"response": {
"signature": "ArniCzEFCYHOMZg4f+c7dYXhkT/J0tpQ6+pB2rpOFJQ="
},
"success": true
},
"status": 200
}