Fix angularjs/angular; 'export declare'/'declare export'

This commit is contained in:
Ryan Cavanaugh
2016-04-25 13:02:25 -07:00
parent 31dfe55013
commit 541e24b685
293 changed files with 2013 additions and 2013 deletions

View File

@@ -10,27 +10,27 @@
* Please note: It is highly important that the PRNG used is cryptographically secure and that it is seeded properly!
* @param random Function taking the number of bytes to generate as its sole argument, returning the corresponding array of cryptographically secure random byte values.
*/
declare export function setRandomFallback(random: (random: number) => number[]): void;
export declare function setRandomFallback(random: (random: number) => number[]): void;
/**
* Synchronously generates a salt.
* @param rounds Number of rounds to use, defaults to 10 if omitted
* @return Resulting salt
*/
declare export function genSaltSync(rounds?: number): string;
export declare function genSaltSync(rounds?: number): string;
/**
* Asynchronously generates a salt.
* @param callback Callback receiving the error, if any, and the resulting salt
*/
declare export function genSalt(callback: (err: Error, salt: string) => void): void;
export declare function genSalt(callback: (err: Error, salt: string) => void): void;
/**
* Asynchronously generates a salt.
* @param rounds Number of rounds to use, defaults to 10 if omitted
* @param callback Callback receiving the error, if any, and the resulting salt
*/
declare export function genSalt(rounds: number, callback: (err: Error, salt: string) => void): void;
export declare function genSalt(rounds: number, callback: (err: Error, salt: string) => void): void;
/**
* Synchronously generates a hash for the given string.
@@ -38,7 +38,7 @@ declare export function genSalt(rounds: number, callback: (err: Error, salt: str
* @param salt Salt length to generate or salt to use, default to 10
* @return Resulting hash
*/
declare export function hashSync(s: string, salt?: number | string): string;
export declare function hashSync(s: string, salt?: number | string): string;
/**
* Asynchronously generates a hash for the given string.
@@ -47,7 +47,7 @@ declare export function hashSync(s: string, salt?: number | string): string;
* @param callback Callback receiving the error, if any, and the resulting hash
* @param progressCallback Callback successively called with the percentage of rounds completed (0.0 - 1.0), maximally once per MAX_EXECUTION_TIME = 100 ms.
*/
declare export function hash(s: string, salt: number | string, callback: (err: Error, hash: string) => void, progressCallback?: (percent: number) => void): void;
export declare function hash(s: string, salt: number | string, callback: (err: Error, hash: string) => void, progressCallback?: (percent: number) => void): void;
/**
* Synchronously tests a string against a hash.
@@ -55,7 +55,7 @@ declare export function hash(s: string, salt: number | string, callback: (err: E
* @param hash Hash to test against
* @return true if matching, otherwise false
*/
declare export function compareSync(s: string, hash: string): boolean;
export declare function compareSync(s: string, hash: string): boolean;
/**
* Asynchronously compares the given data against the given hash.
@@ -64,18 +64,18 @@ declare export function compareSync(s: string, hash: string): boolean;
* @param callback Callback receiving the error, if any, otherwise the result
* @param progressCallback Callback successively called with the percentage of rounds completed (0.0 - 1.0), maximally once per MAX_EXECUTION_TIME = 100 ms.
*/
declare export function compare(s: string, hash: string, callback: (err: Error, success: boolean) => void, progressCallback?: (percent: number) => void): void;
export declare function compare(s: string, hash: string, callback: (err: Error, success: boolean) => void, progressCallback?: (percent: number) => void): void;
/**
* Gets the number of rounds used to encrypt the specified hash.
* @param hash Hash to extract the used number of rounds from
* @return Number of rounds used
*/
declare export function getRounds(hash: string): number;
export declare function getRounds(hash: string): number;
/**
* Gets the salt portion from a hash. Does not validate the hash.
* @param hash Hash to extract the salt from
* @return Extracted salt part
*/
declare export function getSalt(hash: string): string;
export declare function getSalt(hash: string): string;