openssl-rand.pod.in 1.6 KB

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