Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AbstractCryptoEngine Abstract

Hierarchy

Implements

Index

Constructors

Properties

crypto: Crypto
name: string
subtle: SubtleCrypto

Methods

  • decrypt(algorithm: AesCbcParams | AesCtrParams | AesGcmParams | AlgorithmIdentifier | RsaOaepParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>
  • deriveBits(algorithm: EcdhKeyDeriveParams | AlgorithmIdentifier | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise<ArrayBuffer>
  • deriveKey(algorithm: EcdhKeyDeriveParams | AlgorithmIdentifier | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AesDerivedKeyParams | AlgorithmIdentifier | HkdfParams | HmacImportParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>
  • deriveKey(algorithm: EcdhKeyDeriveParams | AlgorithmIdentifier | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: AesDerivedKeyParams | AlgorithmIdentifier | HkdfParams | HmacImportParams | Pbkdf2Params, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>
  • Parameters

    • algorithm: EcdhKeyDeriveParams | AlgorithmIdentifier | HkdfParams | Pbkdf2Params
    • baseKey: CryptoKey
    • derivedKeyType: AesDerivedKeyParams | AlgorithmIdentifier | HkdfParams | HmacImportParams | Pbkdf2Params
    • extractable: boolean
    • keyUsages: KeyUsage[]

    Returns Promise<CryptoKey>

  • Parameters

    • algorithm: EcdhKeyDeriveParams | AlgorithmIdentifier | HkdfParams | Pbkdf2Params
    • baseKey: CryptoKey
    • derivedKeyType: AesDerivedKeyParams | AlgorithmIdentifier | HkdfParams | HmacImportParams | Pbkdf2Params
    • extractable: boolean
    • keyUsages: Iterable<KeyUsage>

    Returns Promise<CryptoKey>

  • digest(algorithm: AlgorithmIdentifier, data: BufferSource): Promise<ArrayBuffer>
  • encrypt(algorithm: AesCbcParams | AesCtrParams | AesGcmParams | AlgorithmIdentifier | RsaOaepParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>
  • exportKey(format: "jwk", key: CryptoKey): Promise<JsonWebKey>
  • exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): Promise<ArrayBuffer>
  • generateKey(algorithm: EcKeyGenParams | RsaHashedKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>
  • generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>
  • generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair | CryptoKey>
  • getAlgorithmByOID<T>(oid: string, safety?: boolean, target?: string): object | T
  • getAlgorithmByOID<T>(oid: string, safety: true, target?: string): T
  • getAlgorithmByOID(oid: any, safety?: any, target?: any): object
  • getOIDByAlgorithm(algorithm: Algorithm, safety?: boolean, target?: string): string
  • getRandomValues<T>(array: T): T
  • importKey(format: "jwk", keyData: JsonWebKey, algorithm: AesKeyAlgorithm | EcKeyImportParams | AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>
  • importKey(format: "raw" | "pkcs8" | "spki", keyData: BufferSource, algorithm: AesKeyAlgorithm | EcKeyImportParams | AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>
  • importKey(format: "jwk", keyData: JsonWebKey, algorithm: AesKeyAlgorithm | EcKeyImportParams | AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>
  • importKey(format: "raw" | "pkcs8" | "spki", keyData: BufferSource, algorithm: AesKeyAlgorithm | EcKeyImportParams | AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>
  • sign(algorithm: EcdsaParams | AlgorithmIdentifier | RsaPssParams, key: CryptoKey, data: BufferSource): Promise<ArrayBuffer>
  • unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesCbcParams | AesCtrParams | AesGcmParams | AlgorithmIdentifier | RsaOaepParams, unwrappedKeyAlgorithm: AesKeyAlgorithm | EcKeyImportParams | AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams, extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKey>
  • unwrapKey(format: KeyFormat, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AesCbcParams | AesCtrParams | AesGcmParams | AlgorithmIdentifier | RsaOaepParams, unwrappedKeyAlgorithm: AesKeyAlgorithm | EcKeyImportParams | AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams, extractable: boolean, keyUsages: Iterable<KeyUsage>): Promise<CryptoKey>
  • Parameters

    • format: KeyFormat
    • wrappedKey: BufferSource
    • unwrappingKey: CryptoKey
    • unwrapAlgorithm: AesCbcParams | AesCtrParams | AesGcmParams | AlgorithmIdentifier | RsaOaepParams
    • unwrappedKeyAlgorithm: AesKeyAlgorithm | EcKeyImportParams | AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams
    • extractable: boolean
    • keyUsages: KeyUsage[]

    Returns Promise<CryptoKey>

  • Parameters

    • format: KeyFormat
    • wrappedKey: BufferSource
    • unwrappingKey: CryptoKey
    • unwrapAlgorithm: AesCbcParams | AesCtrParams | AesGcmParams | AlgorithmIdentifier | RsaOaepParams
    • unwrappedKeyAlgorithm: AesKeyAlgorithm | EcKeyImportParams | AlgorithmIdentifier | HmacImportParams | RsaHashedImportParams
    • extractable: boolean
    • keyUsages: Iterable<KeyUsage>

    Returns Promise<CryptoKey>

  • verify(algorithm: EcdsaParams | AlgorithmIdentifier | RsaPssParams, key: CryptoKey, signature: BufferSource, data: BufferSource): Promise<boolean>
  • verifyWithPublicKey(data: BufferSource, signature: OctetString | BitString, publicKeyInfo: PublicKeyInfo, signatureAlgorithm: AlgorithmIdentifier, shaAlgorithm?: string): Promise<boolean>
  • wrapKey(format: KeyFormat, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AesCbcParams | AesCtrParams | AesGcmParams | AlgorithmIdentifier | RsaOaepParams): Promise<ArrayBuffer>

Generated using TypeDoc