CRYPT_GEN_RANDOM
cryptographic random generator
What changes
- Input
- length, optional seed
- Output or change
- random bytes
Syntax at a glance
CRYPT_GEN_RANDOM ( length [ , seed ] )
Work example
Generate random bytes for a reviewed cryptographic workflow with a defined use.
Use synthetic data in an isolated database. Follow the existing key hierarchy and keep keys and plaintext out of output.
Check your work Choose the documented byte length and never treat random output as a password hash or key lifecycle.
Open Microsoft Learn for full syntax, permissions, and details for your version.