openssl-rand.pod.in 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. =pod
  2. {- OpenSSL::safe::output_do_not_edit_headers(); -}
  3. =head1 NAME
  4. openssl-rand - generate pseudo-random bytes
  5. =head1 SYNOPSIS
  6. B<openssl rand>
  7. [B<-help>]
  8. [B<-out> I<file>]
  9. [B<-base64>]
  10. [B<-hex>]
  11. {- $OpenSSL::safe::opt_engine_synopsis -}{- $OpenSSL::safe::opt_r_synopsis -}
  12. {- $OpenSSL::safe::opt_provider_synopsis -}
  13. I<num>
  14. =for openssl ifdef engine
  15. =head1 DESCRIPTION
  16. This command generates I<num> random bytes using a cryptographically
  17. secure pseudo random number generator (CSPRNG).
  18. The random bytes are generated using the L<RAND_bytes(3)> function,
  19. which provides a security level of 256 bits, provided it managed to
  20. seed itself successfully from a trusted operating system entropy source.
  21. Otherwise, the command will fail with a nonzero error code.
  22. For more details, see L<RAND_bytes(3)>, L<RAND(7)>, and L<EVP_RAND(7)>.
  23. =head1 OPTIONS
  24. =over 4
  25. =item B<-help>
  26. Print out a usage message.
  27. =item B<-out> I<file>
  28. Write to I<file> instead of standard output.
  29. =item B<-base64>
  30. Perform base64 encoding on the output.
  31. =item B<-hex>
  32. Show the output as a hex string.
  33. {- $OpenSSL::safe::opt_engine_item -}
  34. {- $OpenSSL::safe::opt_r_item -}
  35. {- $OpenSSL::safe::opt_provider_item -}
  36. =back
  37. =head1 SEE ALSO
  38. L<openssl(1)>,
  39. L<RAND_bytes(3)>,
  40. L<RAND(7)>,
  41. L<EVP_RAND(7)>
  42. =head1 HISTORY
  43. The B<-engine> option was deprecated in OpenSSL 3.0.
  44. =head1 COPYRIGHT
  45. Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
  46. Licensed under the Apache License 2.0 (the "License"). You may not use
  47. this file except in compliance with the License. You can obtain a copy
  48. in the file LICENSE in the source distribution or at
  49. L<https://www.openssl.org/source/license.html>.
  50. =cut