Skip to main content
Version: 5.7.0

SignRSASha256

Given a piece of data and a private key, calculates an SHA-256 with RSA (SHA256withRSA) signature for the data. This signature can then be verified as authentic by a receiver with access to an associated public key.

Note that the implementation supports both PKCS1 and PKCS8 RSA format private keys.

Method Parameters

ParameterDescription
privateKeyThe private key used to generate the signature
dataStringThe data string to calculate the signature for

Usage

http://localhost:3000
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"data": {
"response": {
"signature": "acdUTXOT8P5q7W6h+IGZYp8s5Vnxj8RvQLRGdYz7ufJ/hxboDetxxxxxxvjDuKlvBrgE/mWg9d+j36EbWkDIDbOhGl61ec0n/ZeYnc7M5j55G1BDATWLu/zzbVwNr+jYVXjlQ7T+/GUpiLvI+vUA5Uv/AQlbQOoeKyzM="
},
"success": true
},
"status": 200
}