Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • SubtleCrypto

Implements

  • SubtleCrypto

Index

Constructors

constructor

Properties

Protected service

service: SocketCrypto

Methods

decrypt

  • decrypt(algorithm: Algorithm, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>

deriveBits

  • deriveBits(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>
  • Parameters

    • algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params
    • baseKey: CryptoKey
    • length: number

    Returns Promise<ArrayBuffer>

deriveKey

  • deriveKey(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKeyProto, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): Promise<CryptoKeyProto>
  • Parameters

    • algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params
    • baseKey: CryptoKeyProto
    • derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params
    • extractable: boolean
    • keyUsages: string[]

    Returns Promise<CryptoKeyProto>

digest

  • digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>

encrypt

  • encrypt(algorithm: Algorithm, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>

Protected encryptData

  • encryptData(algorithm: Algorithm, key: CryptoKeyProto, data: BufferSource, type: string): Promise<ArrayBuffer>

exportKey

  • exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>
  • exportKey(format: "raw" | "spki" | "pkcs8", key: CryptoKey): Promise<ArrayBuffer>
  • exportKey(format: KeyFormat, key: CryptoKey): Promise<JsonWebKey | ArrayBuffer>

generateKey

  • generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): Promise<CryptoKeyPair | CryptoKey>
  • generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: string[]): Promise<CryptoKeyPair>
  • generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): Promise<CryptoKey>

importKey

  • importKey(format: KeyFormat, keyData: JsonWebKey | BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>
  • Parameters

    • format: KeyFormat
    • keyData: JsonWebKey | BufferSource
    • algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams
    • extractable: boolean
    • keyUsages: KeyUsage[]

    Returns Promise<CryptoKey>

sign

  • sign(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>

unwrapKey

  • unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier, unwrappedKeyAlgorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>
  • Parameters

    • format: KeyFormat
    • wrappedKey: BufferSource
    • unwrappingKey: CryptoKey
    • unwrapAlgorithm: AlgorithmIdentifier
    • unwrappedKeyAlgorithm: AlgorithmIdentifier
    • extractable: boolean
    • keyUsages: KeyUsage[]

    Returns Promise<CryptoKey>

verify

  • verify(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>

wrapKey

  • wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier): Promise<ArrayBuffer>

Generated using TypeDoc