From 22e5a2a86d2d7c696cbd03da81c9d0d25429d5ac Mon Sep 17 00:00:00 2001 From: kostas Date: Wed, 20 Aug 2025 11:54:50 +0300 Subject: [PATCH 1/2] chore: acl genpass Signed-off-by: kostas --- docs/command-reference/acl/genpass.md | 31 +++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 docs/command-reference/acl/genpass.md diff --git a/docs/command-reference/acl/genpass.md b/docs/command-reference/acl/genpass.md new file mode 100644 index 00000000..fd6fe3c8 --- /dev/null +++ b/docs/command-reference/acl/genpass.md @@ -0,0 +1,31 @@ +--- +description: Simulate execution of a command from a user +--- + +import PageTitle from '@site/src/components/PageTitle'; + +# ACL DRYRUN + + + +## Syntax + + ACL GENPASS digits + +**ACL categories:** @slow + +The ACL GENPASS command is a password generator that polls from /dev/urandom if available(otherwise it uses a weaker system). + +The command returns a hexadecimal representation of a binary string. By default it emits 256 bits (so 64 hex characters) which is tunable via the command argument. Note, that the number of bits provided is rounded to the next multiple of 4. + +## Return + +- [Simple string reply](https://redis.io/docs/reference/protocol-spec/#simple-strings): `OK` on success. +- [Bulk string reply](https://redis.io/docs/reference/protocol-spec/#bulk-strings): pseudorandom data. By default it contains 64 bytes, representing 256 bits of data. If bits was given, the output string length is the number of specified bits (rounded to the next multiple of 4) divided by 4. + +## Examples + +```shell +dragonfly> ACL GENPASS 3 +"ot2" +``` From b8b0ee703307655d6e0ac84628e1c840d37fea2b Mon Sep 17 00:00:00 2001 From: Joe Zhou Date: Fri, 22 Aug 2025 01:04:57 -0400 Subject: [PATCH 2/2] chore: acl genpass - details --- docs/command-reference/acl/genpass.md | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/docs/command-reference/acl/genpass.md b/docs/command-reference/acl/genpass.md index fd6fe3c8..d28bcbdc 100644 --- a/docs/command-reference/acl/genpass.md +++ b/docs/command-reference/acl/genpass.md @@ -4,28 +4,36 @@ description: Simulate execution of a command from a user import PageTitle from '@site/src/components/PageTitle'; -# ACL DRYRUN +# ACL GENPASS ## Syntax - ACL GENPASS digits + ACL GENPASS [bits] **ACL categories:** @slow -The ACL GENPASS command is a password generator that polls from /dev/urandom if available(otherwise it uses a weaker system). +This command is a password generator that polls from `/dev/urandom` if available. +Otherwise, it uses a weaker system. -The command returns a hexadecimal representation of a binary string. By default it emits 256 bits (so 64 hex characters) which is tunable via the command argument. Note, that the number of bits provided is rounded to the next multiple of 4. +The command returns a hexadecimal representation of a binary string. +By default it emits 256 bits (so 64 hex characters), which is tunable via the command argument `bits`. +Note that the number of bits provided is rounded to the next multiple of 4. ## Return -- [Simple string reply](https://redis.io/docs/reference/protocol-spec/#simple-strings): `OK` on success. -- [Bulk string reply](https://redis.io/docs/reference/protocol-spec/#bulk-strings): pseudorandom data. By default it contains 64 bytes, representing 256 bits of data. If bits was given, the output string length is the number of specified bits (rounded to the next multiple of 4) divided by 4. +- [Bulk string reply](https://redis.io/docs/latest/develop/reference/protocol-spec#bulk-strings): pseudorandom data. + By default it contains 64 bytes, representing 256 bits of data. + If the `bits` argument was given, the output string length is the number of specified bits (rounded to the next multiple of 4) divided by 4. ## Examples ```shell -dragonfly> ACL GENPASS 3 -"ot2" +dragonfly> ACL GENPASS 3 +"a" +dragonfly> ACL GENPASS 32 +"69ee5ab3" +dragonfly> ACL GENPASS +"3aa763f86ced2b83b4cd6a4d83f17cb75e73b4e0d9f8655411faef9ff2c8fd8f" ```