Skip to content

Commit 812ed01

Browse files
committed
Document crypto.ripemd160
1 parent 4a1f0b8 commit 812ed01

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

docs/Runtime Environment/Crypto.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,15 @@ local crypto = require("crypto")
232232
assert(crypto.sha512("Pluto", false) == "ee8410a8bf9511b94fd6669b5c3e0c4b86e8e4bf7baa8dbd2773d4d6381dd1aecebbe391bef4c6158620ab3f6b794907652d4432c2301d7e1a6caf520565cdf2")
233233
```
234234
---
235+
### `crypto.ripemd160`
236+
Hash a string using the RIPEMD-160 cryptographic hashing algorithm.
237+
#### Parameters
238+
1. The string to hash.
239+
2. When set to true, returns raw binary data. false outputs lowercase hex digits. By default, this is false.
240+
```pluto
241+
assert(require"crypto".ripemd160("Pluto") == "c2072a85f4a691803b8942709036072086fd9550")
242+
```
243+
---
235244
## Cryptographic PRNGs
236245
### `crypto.random`
237246
This is a cryptographically secure PRNG, assuming the platform's implementation of the underlying primitive is secure.

0 commit comments

Comments
 (0)