8000 Stdlib: cryptographically secure random bytes · Issue #404 · kexhq/kex · GitHub
[go: up one dir, main page]

Skip to content

Stdlib: cryptographically secure random bytes #404

Closed

Description

@akoskovacs

Marqraft generates page ids and per-process session tokens from cryptographically secure randomness:

foul identifier -> String do
  return "${BEAM.binary.encode_hex(BEAM.crypto.strong_rand_bytes(32), :lowercase)}"
end

Random has no secure source that I could find. Suggested: Random.secureBytes(count) -> Binary (Binary.hex already exists for the encoding), and perhaps Random.token(bytes) -> String.

Activity

  1. added this to the 0.4.0 milestone on Sep 28, 2026
  2. akoskovacs commented on Sep 28, 2026

    @akoskovacs
    CollaboratorAuthor

    Implemented in 7ac10d8 (on main); verified by its spec/test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0