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

```
STRING digest.hash_sha1_from_base64(STRING s)
```

**Available in:** all subroutines

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

## Example

```vcl
declare local var.hash_sha1 STRING;
set var.hash_sha1 = digest.hash_sha1_from_base64("SGVsbG8sIHdvcmxkIQo=");
# var.hash_sha1 is now "09fac8dbfd27bd9b4d23a00eb648aa751789536d"
```
