You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
444B

  1. /**
  2. Generate a [cryptographically strong](https://en.m.wikipedia.org/wiki/Strong_cryptography) random string.
  3. @param length - Length of the returned string.
  4. @returns A [`hex`](https://en.wikipedia.org/wiki/Hexadecimal) string.
  5. @example
  6. ```
  7. import cryptoRandomString = require('crypto-random-string');
  8. cryptoRandomString(10);
  9. //=> '2cf05d94db'
  10. ```
  11. */
  12. declare function cryptoRandomString(length: number): string;
  13. export = cryptoRandomString;