Options
All
  • Public
  • Public/Protected
  • All
Menu

Module @webcrypto-local/client

@webcrypto-local/client

A package of webcrypto-local framework. WebSocket client

Installation

npm install --save-dev @webcrypto-local/client

Usage

const client = require('@webcrypto-local/client');

Browser

<!-- Babel Polyfill -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-polyfill/7.8.3/polyfill.min.js"></script>
<!-- Crypto -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/asmCrypto/2.3.2/asmcrypto.all.es5.min.js"></script>
<script src="https://cdn.rawgit.com/indutny/elliptic/master/dist/elliptic.min.js"></script>
<script src="https://unpkg.com/webcrypto-liner@1.1.4/build/webcrypto-liner.shim.min.js"></script>
<!-- WebCrypto Socket -->
<script src="https://unpkg.com/protobufjs@6.8.8/dist/protobuf.min.js"></script>
<script src="https://unpkg.com/@webcrypto-local/client@1.0.14/build/webcrypto-socket.min.js"></script>

Index

References

BrowserStorage

Re-exports BrowserStorage

BrowserStorage

Re-exports BrowserStorage

Client

Re-exports Client

ClientCloseEvent

Re-exports ClientCloseEvent

ClientErrorEvent

Re-exports ClientErrorEvent

ClientEvent

Re-exports ClientEvent

ClientListeningEvent

Re-exports ClientListeningEvent

CryptoServerError

Re-exports CryptoServerError

CryptoServerError

Re-exports CryptoServerError

MemoryStorage

Re-exports MemoryStorage

MemoryStorage

Re-exports MemoryStorage

PromiseStackItem

Re-exports PromiseStackItem

RatchetStorage

Re-exports RatchetStorage

RatchetStorage

Re-exports RatchetStorage

SocketCrypto

Re-exports SocketCrypto

SocketCryptoState

Re-exports SocketCryptoState

SocketProvider

Re-exports SocketProvider

getEngine

Re-exports getEngine

setEngine

Re-exports setEngine

Type aliases

Primitive

Primitive: "number" | "string" | "object" | "boolean"

Functions

Cast

  • Cast<T>(data: any): T

checkAlgorithm

  • checkAlgorithm(algorithm: AlgorithmIdentifier, param: string): void
  • Throws TypeError exception if algorithm has wrong type or doesn't have required name property

    Parameters

    • algorithm: AlgorithmIdentifier

      Algorithm identifier

    • param: string

      Param name

    Returns void

checkArray

  • checkArray(data: any, param: string): void
  • Throws TypeError exception if data is not Array

    Parameters

    • data: any

      Checkable data

    • param: string

      Param name

    Returns void

checkBufferSource

  • checkBufferSource(data: any, param: string): void
  • Throws TypeError exception if data is not BufferSource

    Parameters

    • data: any

      Checkable data

    • param: string

      Param name

    Returns void

checkCryptoCertificate

  • checkCryptoCertificate(data: any, param: string): void
  • Throws TypeError exception if data is not CryptoCertificate

    Parameters

    • data: any

      Checkable data

    • param: string

      Param name

    Returns void

checkCryptoKey

  • checkCryptoKey(data: any, param: string): void
  • Throws TypeError exception if data is not CryptoKey

    Parameters

    • data: any

      Checkable data

    • param: string

      Param name

    Returns void

checkPrimitive

  • checkPrimitive(data: any, type: Primitive, param: string): void
  • Throws TypeError exception if data is not defined Primitive

    Parameters

    • data: any

      Checkable data

    • type: Primitive

      Primitive type name

    • param: string

      Param name

    Returns void

isCryptoCertificate

  • isCryptoCertificate(data: any): data is CryptoCertificateProto

isCryptoKey

  • isCryptoKey(data: any): data is CryptoKeyProto

isEdge

  • isEdge(): boolean

isFirefox

  • isFirefox(): boolean

isHashedAlgorithm

  • isHashedAlgorithm(data: any): data is HashedAlgorithm

prepareAlgorithm

  • prepareAlgorithm(algorithm: AlgorithmIdentifier): AlgorithmProto

updateEcPublicKey

  • updateEcPublicKey(ecPublicKey: ECPublicKey, publicKey: CryptoKey): Promise<void>

Object literals

Const AES_CBC

AES_CBC: object

iv

iv: ArrayBuffer = new ArrayBuffer(16)

name

name: string = "AES-CBC"

Const ECDH

ECDH: object

name

name: string = "ECDH"

namedCurve

namedCurve: string = "P-256"

Const ECDSA

ECDSA: object

name

name: string = "ECDSA"

namedCurve

namedCurve: string = "P-256"

Generated using TypeDoc