openssl-rand.pod.in 1.7 KB

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