From 6af540418f106a19bff83e6311c87dca38ec4a9a Mon Sep 17 00:00:00 2001 From: microshine Date: Sat, 2 Mar 2019 10:24:48 +0300 Subject: [PATCH] Fix type errors --- src/mechs/aes/aes_kw.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mechs/aes/aes_kw.ts b/src/mechs/aes/aes_kw.ts index 87a3631..527ebd9 100644 --- a/src/mechs/aes/aes_kw.ts +++ b/src/mechs/aes/aes_kw.ts @@ -4,7 +4,7 @@ import { AesCryptoKey } from "./key"; export class AesKwProvider extends core.AesKwProvider { - public async onGenerateKey(algorithm: AesKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { + public async onGenerateKey(algorithm: AesKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { return await AesCrypto.generateKey( { name: this.name, @@ -23,11 +23,11 @@ export class AesKwProvider extends core.AesKwProvider { return AesCrypto.importKey(format, keyData, { name: algorithm.name }, extractable, keyUsages); } - public async onEncrypt(algorithm: AesKeyAlgorithm, key: AesCryptoKey, data: ArrayBuffer): Promise { + public async onEncrypt(algorithm: Algorithm, key: AesCryptoKey, data: ArrayBuffer): Promise { return AesCrypto.encrypt(algorithm, key, new Uint8Array(data)); } - public async onDecrypt(algorithm: AesKeyAlgorithm, key: AesCryptoKey, data: ArrayBuffer): Promise { + public async onDecrypt(algorithm: Algorithm, key: AesCryptoKey, data: ArrayBuffer): Promise { return AesCrypto.decrypt(algorithm, key, new Uint8Array(data)); }