Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace crypto

Index

Variables

Functions

Variables

Const aes

aes: { decrypt: (bytes: Uint8Array, key: string) => Promise<Uint8Array>; decryptGCM: (encrypted: string, keyStr: string, ivStr: string) => Promise<string>; encrypt: (bytes: Uint8Array, key: string) => Promise<Uint8Array>; genKeyStr: () => Promise<string> } = ...

Type declaration

  • decrypt: (bytes: Uint8Array, key: string) => Promise<Uint8Array>
      • (bytes: Uint8Array, key: string): Promise<Uint8Array>
      • Parameters

        • bytes: Uint8Array
        • key: string

        Returns Promise<Uint8Array>

  • decryptGCM: (encrypted: string, keyStr: string, ivStr: string) => Promise<string>
      • (encrypted: string, keyStr: string, ivStr: string): Promise<string>
      • Parameters

        • encrypted: string
        • keyStr: string
        • ivStr: string

        Returns Promise<string>

  • encrypt: (bytes: Uint8Array, key: string) => Promise<Uint8Array>
      • (bytes: Uint8Array, key: string): Promise<Uint8Array>
      • Parameters

        • bytes: Uint8Array
        • key: string

        Returns Promise<Uint8Array>

  • genKeyStr: () => Promise<string>
      • (): Promise<string>
      • Returns Promise<string>

Const ed25519

ed25519: { verify: (message: Uint8Array, signature: Uint8Array, publicKey: Uint8Array) => Promise<boolean> } = ...

Type declaration

  • verify: (message: Uint8Array, signature: Uint8Array, publicKey: Uint8Array) => Promise<boolean>
      • (message: Uint8Array, signature: Uint8Array, publicKey: Uint8Array): Promise<boolean>
      • Parameters

        • message: Uint8Array
        • signature: Uint8Array
        • publicKey: Uint8Array

        Returns Promise<boolean>

Const hash

hash: { sha256: (bytes: Uint8Array) => Promise<Uint8Array>; sha256Str: (str: string) => Promise<string> } = ...

Type declaration

  • sha256: (bytes: Uint8Array) => Promise<Uint8Array>
      • (bytes: Uint8Array): Promise<Uint8Array>
      • Parameters

        • bytes: Uint8Array

        Returns Promise<Uint8Array>

  • sha256Str: (str: string) => Promise<string>
      • (str: string): Promise<string>
      • Parameters

        • str: string

        Returns Promise<string>

Const keystore

keystore: { clear: () => Promise<void>; decrypt: (encrypted: string) => Promise<string>; exportSymmKey: (name: string) => Promise<string>; getAlg: () => Promise<string>; importSymmKey: (key: string, name: string) => Promise<void>; keyExists: (keyName: string) => Promise<boolean>; publicReadKey: () => Promise<string>; publicWriteKey: () => Promise<string>; sign: (message: string, charSize: number) => Promise<string> } = ...

Type declaration

  • clear: () => Promise<void>
      • (): Promise<void>
      • Returns Promise<void>

  • decrypt: (encrypted: string) => Promise<string>
      • (encrypted: string): Promise<string>
      • Parameters

        • encrypted: string

        Returns Promise<string>

  • exportSymmKey: (name: string) => Promise<string>
      • (name: string): Promise<string>
      • Parameters

        • name: string

        Returns Promise<string>

  • getAlg: () => Promise<string>
      • (): Promise<string>
      • Returns Promise<string>

  • importSymmKey: (key: string, name: string) => Promise<void>
      • (key: string, name: string): Promise<void>
      • Parameters

        • key: string
        • name: string

        Returns Promise<void>

  • keyExists: (keyName: string) => Promise<boolean>
      • (keyName: string): Promise<boolean>
      • Parameters

        • keyName: string

        Returns Promise<boolean>

  • publicReadKey: () => Promise<string>
      • (): Promise<string>
      • Returns Promise<string>

  • publicWriteKey: () => Promise<string>
      • (): Promise<string>
      • Returns Promise<string>

  • sign: (message: string, charSize: number) => Promise<string>
      • (message: string, charSize: number): Promise<string>
      • Parameters

        • message: string
        • charSize: number

        Returns Promise<string>

Const rsa

rsa: { verify: (message: Uint8Array, signature: Uint8Array, publicKey: Uint8Array) => Promise<boolean> } = ...

Type declaration

  • verify: (message: Uint8Array, signature: Uint8Array, publicKey: Uint8Array) => Promise<boolean>
      • (message: Uint8Array, signature: Uint8Array, publicKey: Uint8Array): Promise<boolean>
      • Parameters

        • message: Uint8Array
        • signature: Uint8Array
        • publicKey: Uint8Array

        Returns Promise<boolean>

Functions

Const sha256Str

  • sha256Str(str: string): Promise<string>

Generated using TypeDoc