From eda6bc4f0a14fcbbcfd44fb03f585f34361d290a Mon Sep 17 00:00:00 2001 From: microshine Date: Sat, 2 Mar 2019 09:25:06 +0300 Subject: [PATCH] Fix type errors --- src/mechs/aes/aes_cbc.ts | 2 +- src/mechs/aes/aes_cmac.ts | 2 +- src/mechs/aes/aes_ctr.ts | 2 +- src/mechs/aes/aes_gcm.ts | 2 +- src/mechs/des/des_cbc.ts | 2 +- src/mechs/des/des_ede3_cbc.ts | 2 +- src/mechs/ec/ec_dh.ts | 2 +- src/mechs/ec/ec_dsa.ts | 2 +- src/mechs/pbkdf/pbkdf2.ts | 2 +- src/mechs/rsa/rsa_oaep.ts | 2 +- src/mechs/rsa/rsa_pss.ts | 2 +- src/mechs/rsa/rsa_ssa.ts | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/mechs/aes/aes_cbc.ts b/src/mechs/aes/aes_cbc.ts index f110085..f145cf3 100644 --- a/src/mechs/aes/aes_cbc.ts +++ b/src/mechs/aes/aes_cbc.ts @@ -4,7 +4,7 @@ import { AesCryptoKey } from "./key"; export class AesCbcProvider extends core.AesCbcProvider { - public async onGenerateKey(algorithm: AesKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { + public async onGenerateKey(algorithm: AesKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { const key = await AesCrypto.generateKey( { name: this.name, diff --git a/src/mechs/aes/aes_cmac.ts b/src/mechs/aes/aes_cmac.ts index 9db4484..bfa40ec 100644 --- a/src/mechs/aes/aes_cmac.ts +++ b/src/mechs/aes/aes_cmac.ts @@ -4,7 +4,7 @@ import { AesCryptoKey } from "./key"; export class AesCmacProvider extends core.AesCmacProvider { - public async onGenerateKey(algorithm: AesKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { + public async onGenerateKey(algorithm: AesKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { const key = await AesCrypto.generateKey( { name: this.name, diff --git a/src/mechs/aes/aes_ctr.ts b/src/mechs/aes/aes_ctr.ts index 160e609..d2cd221 100644 --- a/src/mechs/aes/aes_ctr.ts +++ b/src/mechs/aes/aes_ctr.ts @@ -4,7 +4,7 @@ import { AesCryptoKey } from "./key"; export class AesCtrProvider extends core.AesCtrProvider { - public async onGenerateKey(algorithm: AesKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { + public async onGenerateKey(algorithm: AesKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { const key = await AesCrypto.generateKey( { name: this.name, diff --git a/src/mechs/aes/aes_gcm.ts b/src/mechs/aes/aes_gcm.ts index 13b0b29..defb8f4 100644 --- a/src/mechs/aes/aes_gcm.ts +++ b/src/mechs/aes/aes_gcm.ts @@ -4,7 +4,7 @@ import { AesCryptoKey } from "./key"; export class AesGcmProvider extends core.AesGcmProvider { - public async onGenerateKey(algorithm: AesKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { + public async onGenerateKey(algorithm: AesKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { const key = await AesCrypto.generateKey( { name: this.name, diff --git a/src/mechs/des/des_cbc.ts b/src/mechs/des/des_cbc.ts index 1985f86..af9d7fa 100644 --- a/src/mechs/des/des_cbc.ts +++ b/src/mechs/des/des_cbc.ts @@ -11,7 +11,7 @@ export class DesCbcProvider extends core.DesProvider { public ivSize = 8; public name = "DES-CBC"; - public async onGenerateKey(algorithm: core.DesKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { + public async onGenerateKey(algorithm: core.DesKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { const key = await DesCrypto.generateKey( { name: this.name, diff --git a/src/mechs/des/des_ede3_cbc.ts b/src/mechs/des/des_ede3_cbc.ts index bc27a75..b35522f 100644 --- a/src/mechs/des/des_ede3_cbc.ts +++ b/src/mechs/des/des_ede3_cbc.ts @@ -11,7 +11,7 @@ export class DesEde3CbcProvider extends core.DesProvider { public ivSize = 8; public name = "DES-EDE3-CBC"; - public async onGenerateKey(algorithm: core.DesKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { + public async onGenerateKey(algorithm: core.DesKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { const key = await DesCrypto.generateKey( { name: this.name, diff --git a/src/mechs/ec/ec_dh.ts b/src/mechs/ec/ec_dh.ts index 52c4202..501e1d8 100644 --- a/src/mechs/ec/ec_dh.ts +++ b/src/mechs/ec/ec_dh.ts @@ -6,7 +6,7 @@ import { EcPublicKey } from "./public_key"; export class EcdhProvider extends core.EcdhProvider { - public async onGenerateKey(algorithm: EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { + public async onGenerateKey(algorithm: EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { const key = await EcCrypto.generateKey( { ...algorithm, diff --git a/src/mechs/ec/ec_dsa.ts b/src/mechs/ec/ec_dsa.ts index 86e9c1d..89a1a4e 100644 --- a/src/mechs/ec/ec_dsa.ts +++ b/src/mechs/ec/ec_dsa.ts @@ -8,7 +8,7 @@ export class EcdsaProvider extends core.EcdsaProvider { public namedCurves = ["P-256", "P-384", "P-521", "K-256"]; - public async onGenerateKey(algorithm: EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { + public async onGenerateKey(algorithm: EcKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { const key = await EcCrypto.generateKey( { ...algorithm, diff --git a/src/mechs/pbkdf/pbkdf2.ts b/src/mechs/pbkdf/pbkdf2.ts index 69f1b08..ab3cdcb 100644 --- a/src/mechs/pbkdf/pbkdf2.ts +++ b/src/mechs/pbkdf/pbkdf2.ts @@ -18,7 +18,7 @@ export class Pbkdf2Provider extends core.Pbkdf2Provider { }); } - public async importKey(format: KeyFormat, keyData: JsonWebKey | ArrayBuffer, algorithm: Algorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise { + public async onImportKey(format: KeyFormat, keyData: JsonWebKey | ArrayBuffer, algorithm: Algorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise { if (format === "raw") { const key = new PbkdfCryptoKey(); key.data = Buffer.from(keyData as ArrayBuffer); diff --git a/src/mechs/rsa/rsa_oaep.ts b/src/mechs/rsa/rsa_oaep.ts index 476541e..2c1c29f 100644 --- a/src/mechs/rsa/rsa_oaep.ts +++ b/src/mechs/rsa/rsa_oaep.ts @@ -6,7 +6,7 @@ import { RsaPublicKey } from "./public_key"; export class RsaOaepProvider extends core.RsaOaepProvider { - public async onGenerateKey(algorithm: RsaHashedKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { + public async onGenerateKey(algorithm: RsaHashedKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { const key = await RsaCrypto.generateKey( { ...algorithm, diff --git a/src/mechs/rsa/rsa_pss.ts b/src/mechs/rsa/rsa_pss.ts index 676f7fd..489393b 100644 --- a/src/mechs/rsa/rsa_pss.ts +++ b/src/mechs/rsa/rsa_pss.ts @@ -6,7 +6,7 @@ import { RsaPublicKey } from "./public_key"; export class RsaPssProvider extends core.RsaPssProvider { - public async onGenerateKey(algorithm: RsaHashedKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { + public async onGenerateKey(algorithm: RsaHashedKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { const key = await RsaCrypto.generateKey( { ...algorithm, diff --git a/src/mechs/rsa/rsa_ssa.ts b/src/mechs/rsa/rsa_ssa.ts index bdf8c26..046ecb4 100644 --- a/src/mechs/rsa/rsa_ssa.ts +++ b/src/mechs/rsa/rsa_ssa.ts @@ -6,7 +6,7 @@ import { RsaPublicKey } from "./public_key"; export class RsaSsaProvider extends core.RsaSsaProvider { - public async onGenerateKey(algorithm: RsaHashedKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { + public async onGenerateKey(algorithm: RsaHashedKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise { const key = await RsaCrypto.generateKey( { ...algorithm,