mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-13 13:54:39 -04:00
Add namespace for hash functions
This commit is contained in:
parent
70fe8d2f04
commit
397c81cb7a
@ -1,21 +1,26 @@
|
|||||||
---
|
---
|
||||||
title: crypto.FNV32a
|
title: crypto.FNV32a
|
||||||
description: Returns the FNV (Fowler–Noll–Vo) 32-bit hash of a given string.
|
description: Returns the 32-bit FNV (Fowler–Noll–Vo) non-cryptographic hash of the given string.
|
||||||
categories: []
|
categories: []
|
||||||
keywords: []
|
keywords: []
|
||||||
action:
|
action:
|
||||||
aliases: []
|
aliases: []
|
||||||
related:
|
related:
|
||||||
|
- functions/hash/Xxhash
|
||||||
- functions/crypto/HMAC
|
- functions/crypto/HMAC
|
||||||
- functions/crypto/MD5
|
- functions/crypto/MD5
|
||||||
- functions/crypto/SHA1
|
- functions/crypto/SHA1
|
||||||
- functions/crypto/SHA256
|
- functions/crypto/SHA256
|
||||||
returnType: int
|
returnType: int
|
||||||
signatures: [crypto.FNV32a STRING]
|
signatures: [crypto.FNV32a STRING]
|
||||||
aliases: [/functions/crypto.fnv32a]
|
expiryDate: 2025-07-31 # deprecated 2024-07-31
|
||||||
---
|
---
|
||||||
|
|
||||||
This function calculates the 32-bit [FNV1a hash](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV-1a_hash) of a given string according to the [specification](https://datatracker.ietf.org/doc/html/draft-eastlake-fnv-12):
|
{{% deprecated-in 0.129.0 %}}
|
||||||
|
Use [`hash.FNV32a`] instead.
|
||||||
|
|
||||||
|
[`hash.FNV32a`]: /functions/hash/FNV32a/
|
||||||
|
{{% /deprecated-in %}}
|
||||||
|
|
||||||
```go-html-template
|
```go-html-template
|
||||||
{{ crypto.FNV32a "Hello world" }} → 1498229191
|
{{ crypto.FNV32a "Hello world" }} → 1498229191
|
||||||
|
21
content/en/functions/hash/FNV32a.md
Normal file
21
content/en/functions/hash/FNV32a.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
---
|
||||||
|
title: hash.FNV32a
|
||||||
|
description: Returns the 32-bit FNV (Fowler–Noll–Vo) non-cryptographic hash of the given string.
|
||||||
|
categories: []
|
||||||
|
keywords: []
|
||||||
|
action:
|
||||||
|
aliases: []
|
||||||
|
related:
|
||||||
|
- functions/hash/Xxhash
|
||||||
|
- functions/crypto/HMAC
|
||||||
|
- functions/crypto/MD5
|
||||||
|
- functions/crypto/SHA1
|
||||||
|
- functions/crypto/SHA256
|
||||||
|
returnType: int
|
||||||
|
signatures: [hash.FNV32a STRING]
|
||||||
|
aliases: [/functions/crypto.fnv32a]
|
||||||
|
---
|
||||||
|
|
||||||
|
```go-html-template
|
||||||
|
{{ hash.FNV32a "Hello world" }} → 1498229191
|
||||||
|
```
|
20
content/en/functions/hash/XxHash.md
Normal file
20
content/en/functions/hash/XxHash.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
title: hash.XxHash
|
||||||
|
description: Returns the 64-bit xxHash non-cryptographic hash of the given string.
|
||||||
|
categories: []
|
||||||
|
keywords: []
|
||||||
|
action:
|
||||||
|
aliases: []
|
||||||
|
related:
|
||||||
|
- functions/hash/FNV32a
|
||||||
|
- functions/crypto/HMAC
|
||||||
|
- functions/crypto/MD5
|
||||||
|
- functions/crypto/SHA1
|
||||||
|
- functions/crypto/SHA256
|
||||||
|
returnType: string
|
||||||
|
signatures: [hash.XxHash STRING]
|
||||||
|
---
|
||||||
|
|
||||||
|
```go-html-template
|
||||||
|
{{ hash.XxHash "Hello world" }} → c500b0c912b376d8
|
||||||
|
```
|
12
content/en/functions/hash/_index.md
Normal file
12
content/en/functions/hash/_index.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
title: Hash functions
|
||||||
|
linkTitle: hash
|
||||||
|
description: Template functions to create non-cryptographic hashes.
|
||||||
|
categories: []
|
||||||
|
keywords: []
|
||||||
|
menu:
|
||||||
|
docs:
|
||||||
|
parent: functions
|
||||||
|
---
|
||||||
|
|
||||||
|
Use these functions to create non-cryptographic hashes.
|
Loading…
x
Reference in New Issue
Block a user