---
title: digest.hash_sha256_from_base64
summary: null
url: >-
  https://www.fastly.com/documentation/reference/vcl/functions/cryptographic/digest-hash-sha256-from-base64
---

```
STRING digest.hash_sha256_from_base64(STRING s)
```

**Available in:** all subroutines

Decodes a Base64-encoded string and then calculates a SHA-256 cryptographic 
hash for the decoded string.

## Example

```vcl
declare local var.hash_sha256 STRING;
set var.hash_sha256 = digest.hash_sha256_from_base64("SGVsbG8sIHdvcmxkIQo=");
# var.hash_sha256 is now "d9014c4624844aa5bac314773d6b689ad467fa4e1d1a50a1b8a99d5a95f72ff5"
```
