---
title: SHA sign and return Base64
slug: sha-sign-and-return-base64
docTags: 
createdAt: 2021-07-26T08:55:33.000Z
---

This hashes your input with a provided key using SHA256 algorithm and returns a Base64 value



### API Definition

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://orca.pathfix.com/functions/text/tosha256tob64",
  "name": "SHA to Base64 API",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "nH7mEuq-azhAL7yWDhVWV",
        "code": "{\n\t\"output\": \"c8upXBF41YUVbhWODYHMa0W7gwUUxkCS2/VzvlQt2tE=\"\n}",
        "language": "200"
      },
      {
        "id": "-q_pNtJu_AqKhilGgaDkt",
        "code": "{\n    \"message\": \"error\"\n}",
        "language": "404"
      }
    ],
    "selectedLanguageId": "nH7mEuq-azhAL7yWDhVWV"
  },
  "examples": {
    "languages": [
      {
        "id": "ZkvkzBoVz5Qi0CGkCNJZC",
        "code": "{\r\n\t\"input\": \"202038-1209292838-2928382-392929\",\r\n\t\"key\": \"/.jjshds@dslldkwie\"\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "ZkvkzBoVz5Qi0CGkCNJZC"
  },
  "description": "Call the following API to hash your input from SHA to Base64",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  }
}
```
:::




### Use Cases

Used in cases where the requirement is to compare signatures. Commonly used in signature verification of webhooks etc. Since this is a one way signing and cannot be decrypted, it is useful to use these to sign passwords etc. before storing into a database.









