@types/cryptiles
TypeScript icon, indicating that this package has built-in type declarations

3.1.2 • Public • Published

Installation

npm install --save @types/cryptiles

Summary

This package contains type definitions for cryptiles (https://github.com/hapijs/cryptiles).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cryptiles.

index.d.ts

/**
 * Returns a cryptographically strong pseudo-random data string. Takes a size argument for the length of the string.
 */
export function randomString(size: number): string;

/**
 * Returns a cryptographically strong pseudo-random data string consisting of only numerical digits (0-9).
 * Takes a size argument for the length of the string.
 */
export function randomDigits(size: number): string;

/**
 * Compare two strings using fixed time algorithm (to prevent time-based analysis of MAC digest match).
 * Returns true if the strings match, false if they differ.
 */
export function fixedTimeComparison(a: string, b: string): boolean;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by Alex Wendland.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/cryptiles

Weekly Downloads

914

Version

3.1.2

License

MIT

Unpacked Size

3.82 kB

Total Files

5

Last publish

Collaborators

  • types