Skip to contents

Phase 3JJJ1. Wraps libsodium's randombytes_buf.

Usage

morie_crypto_random_bytes(n)

Arguments

n

Number of bytes to generate.

Value

Raw vector of length n.

Examples

if (morie_crypto_sodium_available()) {
  r <- morie_crypto_random_bytes(32L)
  length(r)
}
#> [1] 32