Skip to content

Commit f7eb871

Browse files
committed
crypto.fnv1a32
1 parent cfff266 commit f7eb871

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/Runtime Environment/Crypto.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ print(crypto.djb2(str)) --> 894552257
2525
```
2626
---
2727
### `crypto.fnv1`
28-
Hash a string using the FNV1 non-cryptographic hashing algorithm.
28+
Hash a string using the 64-bit FNV1 non-cryptographic hashing algorithm.
2929
#### Parameters
3030
1. The string to hash.
3131
```pluto
@@ -35,7 +35,7 @@ print(crypto.fnv1(str)) --> 9065573210506989167
3535
```
3636
---
3737
### `crypto.fnv1a`
38-
Hash a string using the FNV1A non-cryptographic hashing algorithm.
38+
Hash a string using the 64-bit FNV1A non-cryptographic hashing algorithm.
3939
#### Parameters
4040
1. The string to hash.
4141
```pluto
@@ -44,6 +44,16 @@ local str = "hello world"
4444
print(crypto.fnv1a(str)) --> 8618312879776256743
4545
```
4646
---
47+
### `crypto.fnv1a32`
48+
Hash a string using the 32-bit FNV1A non-cryptographic hashing algorithm.
49+
#### Parameters
50+
1. The string to hash.
51+
```pluto
52+
local crypto = require("crypto")
53+
local str = "hello world"
54+
print(crypto.fnv1a32(str)) --> 3582672807
55+
```
56+
---
4757
### `crypto.joaat`
4858
Hash a string using the JOAAT non-cryptographic hashing algorithm.
4959
#### Parameters

0 commit comments

Comments
 (0)