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

```
STRING digest.hash_sha512_from_base64(STRING s)
```

**Available in:** all subroutines

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

## Example

```vcl
declare local var.hash_sha512 STRING;
set var.hash_sha512 = digest.hash_sha512_from_base64("SGVsbG8sIHdvcmxkIQo=");
# var.hash_sha512 is now "09e1e2a84c92b56c8280f4a1203c7cffd61b162cfe987278d4d6be9afbf38c0e8934cdadf83751f4e99d111352bffefc958e5a4852c8a7a29c95742ce59288a8"
```
