Variable utilsConst

utils: {
    bufferToHash: ((param0) => Promise<string>);
    derKeyToPem: ((param0) => Promise<string>);
    deriveKeyFromPassword: {
        (__namedParameters): Promise<Buffer>;
        (__namedParameters): Promise<string>;
    };
    generateKeyPair: (() => Promise<{
        privateKey: string;
        publicKey: string;
    }>);
    generatePasswordAndMasterKeyBasedOnAuthVersion: ((param0) => Promise<{
        derivedMasterKeys: string;
        derivedPassword: string;
    }>);
    generateRandomString: ((param0) => Promise<string>);
    hashFn: ((param0) => Promise<string>);
    hashPassword: ((param0) => Promise<string>);
    importPBKDF2Key: ((param0) => Promise<CryptoKey>);
    importPrivateKey: ((param0) => Promise<CryptoKey>);
    importPublicKey: ((param0) => Promise<CryptoKey>);
    importRawKey: ((param0) => Promise<CryptoKey>);
} = ...

Type declaration

  • bufferToHash: ((param0) => Promise<string>)
      • (param0): Promise<string>
      • Generates the hash hex digest of a Buffer/Uint8Array.

        Parameters

        • param0: {
              algorithm: "sha512" | "sha256" | "md5";
              buffer: Uint8Array;
          }
          • algorithm: "sha512" | "sha256" | "md5"
          • buffer: Uint8Array

        Returns Promise<string>

        Date

        2/3/2024 - 2:03:24 AM

        Export

        Async

  • derKeyToPem: ((param0) => Promise<string>)
      • (param0): Promise<string>
      • Converts a public/private key in DER format to PEM.

        Parameters

        • param0: {
              key: string;
          }
          • key: string

        Returns Promise<string>

        Date

        2/2/2024 - 7:00:12 PM

        Export

        Async

  • deriveKeyFromPassword: {
        (__namedParameters): Promise<Buffer>;
        (__namedParameters): Promise<string>;
    }
  • generateKeyPair: (() => Promise<{
        privateKey: string;
        publicKey: string;
    }>)
      • (): Promise<{
            privateKey: string;
            publicKey: string;
        }>
      • Generate an asymmetric public/private keypair.

        Returns Promise<{
            privateKey: string;
            publicKey: string;
        }>

        Date

        2/6/2024 - 3:24:43 AM

        Export

        Async

  • generatePasswordAndMasterKeyBasedOnAuthVersion: ((param0) => Promise<{
        derivedMasterKeys: string;
        derivedPassword: string;
    }>)
      • (param0): Promise<{
            derivedMasterKeys: string;
            derivedPassword: string;
        }>
      • Generates/derives the password and master key based on the auth version. Auth Version 1 is deprecated and no longer in use.

        Parameters

        • param0: {
              authVersion: AuthVersion;
              rawPassword: string;
              salt: string;
          }
          • authVersion: AuthVersion
          • rawPassword: string
          • salt: string

        Returns Promise<{
            derivedMasterKeys: string;
            derivedPassword: string;
        }>

        Date

        2/2/2024 - 6:16:04 PM

        Export

        Async

  • generateRandomString: ((param0) => Promise<string>)
      • (param0): Promise<string>
      • Generate a cryptographically secure random string of given length.

        Parameters

        • param0: {
              length: number;
          }
          • length: number

        Returns Promise<string>

        Date

        1/31/2024 - 4:01:20 PM

        Export

  • hashFn: ((param0) => Promise<string>)
      • (param0): Promise<string>
      • Hashes an input (mostly file/folder names).

        Parameters

        • param0: {
              input: string;
          }
          • input: string

        Returns Promise<string>

        Date

        2/2/2024 - 6:59:32 PM

        Export

        Async

  • hashPassword: ((param0) => Promise<string>)
      • (param0): Promise<string>
      • Old V1 authentication password hashing. DEPRECATED AND NOT IN USE, JUST HERE FOR BACKWARDS COMPATIBILITY.

        Parameters

        • param0: {
              password: string;
          }
          • password: string

        Returns Promise<string>

        Date

        2/2/2024 - 6:59:54 PM

        Export

        Async

  • importPBKDF2Key: ((param0) => Promise<CryptoKey>)
      • (param0): Promise<CryptoKey>
      • Imports a PBKDF2 key into WebCrypto's format.

        Parameters

        • param0: {
              key: string;
              keyCache?: boolean;
              mode?: KeyUsage[];
          }
          • key: string
          • Optional keyCache?: boolean
          • Optional mode?: KeyUsage[]

        Returns Promise<CryptoKey>

        Date

        2/6/2024 - 8:56:57 PM

        Export

        Async

  • importPrivateKey: ((param0) => Promise<CryptoKey>)
      • (param0): Promise<CryptoKey>
      • Imports a base64 PCS8 private key to WebCrypto's format.

        Parameters

        • param0: {
              keyCache?: boolean;
              mode?: KeyUsage[];
              privateKey: string;
          }
          • Optional keyCache?: boolean
          • Optional mode?: KeyUsage[]
          • privateKey: string

        Returns Promise<CryptoKey>

        Date

        2/3/2024 - 1:44:39 AM

        Export

        Async

  • importPublicKey: ((param0) => Promise<CryptoKey>)
      • (param0): Promise<CryptoKey>
      • Imports a base64 encoded SPKI public key to WebCrypto's format.

        Parameters

        • param0: {
              keyCache?: boolean;
              mode?: KeyUsage[];
              publicKey: string;
          }
          • Optional keyCache?: boolean
          • Optional mode?: KeyUsage[]
          • publicKey: string

        Returns Promise<CryptoKey>

        Date

        2/2/2024 - 7:04:12 PM

        Export

        Async

  • importRawKey: ((param0) => Promise<CryptoKey>)
      • (param0): Promise<CryptoKey>
      • Imports a raw key to WebCrypto's fromat.

        Parameters

        • param0: {
              algorithm: "AES-GCM" | "AES-CBC";
              key: Buffer;
              keyCache?: boolean;
              mode?: KeyUsage[];
          }
          • algorithm: "AES-GCM" | "AES-CBC"
          • key: Buffer
          • Optional keyCache?: boolean
          • Optional mode?: KeyUsage[]

        Returns Promise<CryptoKey>

        Date

        3/6/2024 - 11:13:40 PM

        Export

        Async

Generated using TypeDoc