SignHMACSha1
Given a piece of data and a shared secrect key, calculates an SHA-1 with HMAC signature for the data. Encoded as a base64 string.
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().signHMACSha1( secrectKey, dataString );
// Return the result
response;
var secrectKey = "aSecrectKey";
var dataString = "String to sign";
var response = {};
response.signature = bridge.utils().signHMACSha1( secrectKey, dataString );
// Return the result
response;
JSON Response
{
"data": {
"response": {
"signature": "wk+UqlrHO+vePXYZsZKvye/q4cA="
},
"success": true
},
"status": 200
}