UNPKG

858 BTypeScriptView Raw
1export declare class RandomGenerator {
2 /**
3 * discuss at: http://locutus.io/php/sha1/
4 * original by: Webtoolkit.info (http://www.webtoolkit.info/)
5 * improved by: Michael White (http://getsprink.com)
6 * improved by: Kevin van Zonneveld (http://kvz.io)
7 * input by: Brett Zamir (http://brett-zamir.me)
8 * note 1: Keep in mind that in accordance with PHP, the whole string is buffered and then
9 * note 1: hashed. If available, we'd recommend using Node's native crypto modules directly
10 * note 1: in a steaming fashion for faster and more efficient hashing
11 * example 1: sha1('Kevin van Zonneveld')
12 * returns 1: '54916d2e62f65b3afa6e192e6a601cdbe5cb5897'
13 */
14 static sha1(str: string): string;
15 /**
16 * RFC4122 compliant UUID v4 generator.
17 */
18 static uuid4(): string;
19}