style: fix lint errors
This commit is contained in:
parent
1dde3c03e9
commit
057b7c481f
|
@ -1,7 +1,7 @@
|
|||
import * as core from "webcrypto-core";
|
||||
import { getCryptoKey, setCryptoKey } from "../storage";
|
||||
import { AesCrypto } from "./crypto";
|
||||
import { AesCryptoKey } from "./key";
|
||||
import { getCryptoKey, setCryptoKey } from "../storage";
|
||||
|
||||
export class AesCbcProvider extends core.AesCbcProvider {
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as crypto from "crypto";
|
||||
import * as core from "webcrypto-core";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
import { AesCrypto } from "./crypto";
|
||||
import { AesCryptoKey } from "./key";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
|
||||
/**
|
||||
* AES-CMAC implementation source code from https://github.com/allan-stewart/node-aes-cmac
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as core from "webcrypto-core";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
import { AesCrypto } from "./crypto";
|
||||
import { AesCryptoKey } from "./key";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
|
||||
export class AesCtrProvider extends core.AesCtrProvider {
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as core from "webcrypto-core";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
import { AesCrypto } from "./crypto";
|
||||
import { AesCryptoKey } from "./key";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
|
||||
export class AesEcbProvider extends core.AesEcbProvider {
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as core from "webcrypto-core";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
import { AesCrypto } from "./crypto";
|
||||
import { AesCryptoKey } from "./key";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
|
||||
export class AesGcmProvider extends core.AesGcmProvider {
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as core from "webcrypto-core";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
import { AesCrypto } from "./crypto";
|
||||
import { AesCryptoKey } from "./key";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
|
||||
export class AesKwProvider extends core.AesKwProvider {
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import crypto, { CipherGCM, DecipherGCM } from "crypto";
|
||||
import { JsonParser, JsonSerializer } from "@peculiar/json-schema";
|
||||
import * as core from "webcrypto-core";
|
||||
import { CryptoKey } from "../../keys";
|
||||
import { AesCryptoKey } from "./key";
|
||||
import { CryptoKey } from "../../keys";
|
||||
|
||||
export class AesCrypto {
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@ import crypto from "crypto";
|
|||
import { JsonParser, JsonSerializer } from "@peculiar/json-schema";
|
||||
import * as core from "webcrypto-core";
|
||||
import { DesParams } from "webcrypto-core";
|
||||
import { CryptoKey } from "../../keys";
|
||||
import { DesCryptoKey } from "./key";
|
||||
import { CryptoKey } from "../../keys";
|
||||
|
||||
export class DesCrypto {
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as core from "webcrypto-core";
|
||||
import { CryptoKey } from "../../keys";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
import { DesCrypto } from "./crypto";
|
||||
import { DesCryptoKey } from "./key";
|
||||
import { CryptoKey } from "../../keys";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
|
||||
export type DesCbcParams = core.DesParams;
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as core from "webcrypto-core";
|
||||
import { CryptoKey } from "../../keys";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
import { DesCrypto } from "./crypto";
|
||||
import { DesCryptoKey } from "./key";
|
||||
import { CryptoKey } from "../../keys";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
|
||||
export type DesEde3CbcParams = core.DesParams;
|
||||
|
||||
|
|
|
@ -3,11 +3,11 @@ import { AsnParser, AsnSerializer } from "@peculiar/asn1-schema";
|
|||
import { JsonParser, JsonSerializer } from "@peculiar/json-schema";
|
||||
import { BufferSourceConverter } from "pvtsutils";
|
||||
import * as core from "webcrypto-core";
|
||||
import { CryptoKey } from "../../keys";
|
||||
import { ShaCrypto } from "../sha";
|
||||
import { getOidByNamedCurve } from "./helper";
|
||||
import { EcPrivateKey } from "./private_key";
|
||||
import { EcPublicKey } from "./public_key";
|
||||
import { CryptoKey } from "../../keys";
|
||||
import { ShaCrypto } from "../sha";
|
||||
|
||||
export class EcCrypto {
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import * as core from "webcrypto-core";
|
||||
import { CryptoKey } from "../../keys";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
import { EcCrypto } from "./crypto";
|
||||
import { EcPrivateKey } from "./private_key";
|
||||
import { EcPublicKey } from "./public_key";
|
||||
import { CryptoKey } from "../../keys";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
|
||||
export class EcdhProvider extends core.EcdhProvider {
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as core from "webcrypto-core";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
import { EcCrypto } from "./crypto";
|
||||
import { EcPrivateKey } from "./private_key";
|
||||
import { EcPublicKey } from "./public_key";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
|
||||
export class EcdsaProvider extends core.EcdsaProvider {
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { AsnParser, AsnSerializer } from "@peculiar/asn1-schema";
|
||||
import { IJsonConvertible, JsonParser, JsonSerializer } from "@peculiar/json-schema";
|
||||
import * as core from "webcrypto-core";
|
||||
import { AsymmetricKey } from "../../keys";
|
||||
import { getOidByNamedCurve } from "./helper";
|
||||
import { AsymmetricKey } from "../../keys";
|
||||
|
||||
export class EcPrivateKey extends AsymmetricKey implements IJsonConvertible {
|
||||
public readonly type = "private" as const;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { AsnParser, AsnSerializer } from "@peculiar/asn1-schema";
|
||||
import { IJsonConvertible, JsonParser, JsonSerializer } from "@peculiar/json-schema";
|
||||
import * as core from "webcrypto-core";
|
||||
import { AsymmetricKey } from "../../keys/asymmetric";
|
||||
import { getOidByNamedCurve } from "./helper";
|
||||
import { AsymmetricKey } from "../../keys/asymmetric";
|
||||
|
||||
export class EcPublicKey extends AsymmetricKey implements IJsonConvertible {
|
||||
|
||||
|
|
|
@ -3,9 +3,9 @@ import { AsnParser } from "@peculiar/asn1-schema";
|
|||
import { JsonParser, JsonSerializer } from "@peculiar/json-schema";
|
||||
import { Convert } from "pvtsutils";
|
||||
import * as core from "webcrypto-core";
|
||||
import { CryptoKey } from "../../keys";
|
||||
import { EdPrivateKey } from "./private_key";
|
||||
import { EdPublicKey } from "./public_key";
|
||||
import { CryptoKey } from "../../keys";
|
||||
|
||||
export class EdCrypto {
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import * as core from "webcrypto-core";
|
||||
import { EdCrypto } from "./crypto";
|
||||
import { CryptoKey } from "../../keys";
|
||||
import { getCryptoKey, setCryptoKey } from "../storage";
|
||||
import { EdCrypto } from "./crypto";
|
||||
|
||||
export class EcdhEsProvider extends core.EcdhEsProvider {
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import * as core from "webcrypto-core";
|
||||
import { CryptoKey } from "../../keys";
|
||||
import { getCryptoKey, setCryptoKey } from "../storage";
|
||||
import { EdCrypto } from "./crypto";
|
||||
import { EdPrivateKey } from "./private_key";
|
||||
import { EdPublicKey } from "./public_key";
|
||||
import { CryptoKey } from "../../keys";
|
||||
import { getCryptoKey, setCryptoKey } from "../storage";
|
||||
|
||||
export class EdDsaProvider extends core.EdDsaProvider {
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { AsnParser, AsnSerializer } from "@peculiar/asn1-schema";
|
||||
import { IJsonConvertible, JsonParser, JsonSerializer } from "@peculiar/json-schema";
|
||||
import * as core from "webcrypto-core";
|
||||
import { AsymmetricKey } from "../../keys";
|
||||
import { getOidByNamedCurve } from "./helper";
|
||||
import { AsymmetricKey } from "../../keys";
|
||||
|
||||
export class EdPrivateKey extends AsymmetricKey implements IJsonConvertible {
|
||||
public readonly type = "private" as const;
|
||||
|
|
|
@ -2,8 +2,8 @@ import { AsnParser, AsnSerializer } from "@peculiar/asn1-schema";
|
|||
import { IJsonConvertible } from "@peculiar/json-schema";
|
||||
import { Convert } from "pvtsutils";
|
||||
import * as core from "webcrypto-core";
|
||||
import { AsymmetricKey } from "../../keys/asymmetric";
|
||||
import { getOidByNamedCurve } from "./helper";
|
||||
import { AsymmetricKey } from "../../keys/asymmetric";
|
||||
|
||||
export class EdPublicKey extends AsymmetricKey implements IJsonConvertible {
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import crypto from "crypto";
|
||||
import * as core from "webcrypto-core";
|
||||
import { BufferSourceConverter, CryptoKey } from "webcrypto-core";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
import { HkdfCryptoKey } from "./key";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
|
||||
export class HkdfProvider extends core.HkdfProvider {
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import crypto from "crypto";
|
||||
import { JsonParser, JsonSerializer } from "@peculiar/json-schema";
|
||||
import * as core from "webcrypto-core";
|
||||
import { HmacCryptoKey } from "./key";
|
||||
import { ShaCrypto } from "../sha";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
import { HmacCryptoKey } from "./key";
|
||||
|
||||
export class HmacProvider extends core.HmacProvider {
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import crypto from "crypto";
|
||||
import * as core from "webcrypto-core";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
import { PbkdfCryptoKey } from "./key";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
|
||||
export class Pbkdf2Provider extends core.Pbkdf2Provider {
|
||||
|
||||
|
|
|
@ -2,9 +2,9 @@ import crypto from "crypto";
|
|||
import { AsnParser, AsnSerializer } from "@peculiar/asn1-schema";
|
||||
import { JsonParser, JsonSerializer } from "@peculiar/json-schema";
|
||||
import * as core from "webcrypto-core";
|
||||
import { CryptoKey } from "../../keys";
|
||||
import { RsaPrivateKey } from "./private_key";
|
||||
import { RsaPublicKey } from "./public_key";
|
||||
import { CryptoKey } from "../../keys";
|
||||
|
||||
interface INodeCryptoSignOptions {
|
||||
key: string;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { AsnParser, AsnSerializer } from "@peculiar/asn1-schema";
|
||||
import { JsonParser, JsonSerializer } from "@peculiar/json-schema";
|
||||
import * as core from "webcrypto-core";
|
||||
import { AsymmetricKey } from "../../keys";
|
||||
import { getJwkAlgorithm } from "./helper";
|
||||
import { AsymmetricKey } from "../../keys";
|
||||
|
||||
export class RsaPrivateKey extends AsymmetricKey {
|
||||
public readonly type = "private" as const;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { AsnParser, AsnSerializer } from "@peculiar/asn1-schema";
|
||||
import { JsonParser, JsonSerializer } from "@peculiar/json-schema";
|
||||
import * as core from "webcrypto-core";
|
||||
import { AsymmetricKey } from "../../keys/asymmetric";
|
||||
import { getJwkAlgorithm } from "./helper";
|
||||
import { AsymmetricKey } from "../../keys/asymmetric";
|
||||
|
||||
export class RsaPublicKey extends AsymmetricKey {
|
||||
public readonly type = "public" as const;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import * as crypto from "crypto";
|
||||
import { Convert } from "pvtsutils";
|
||||
import * as core from "webcrypto-core";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
import { RsaCrypto } from "./crypto";
|
||||
import { RsaPrivateKey } from "./private_key";
|
||||
import { RsaPublicKey } from "./public_key";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
|
||||
export class RsaEsProvider extends core.ProviderCrypto {
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import crypto from "crypto";
|
||||
import * as core from "webcrypto-core";
|
||||
import { ShaCrypto } from "../sha/crypto";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
import { RsaCrypto } from "./crypto";
|
||||
import { RsaPrivateKey } from "./private_key";
|
||||
import { RsaPublicKey } from "./public_key";
|
||||
import { ShaCrypto } from "../sha/crypto";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
|
||||
/**
|
||||
* Source code for decrypt, encrypt, mgf1 functions is from asmcrypto module
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as core from "webcrypto-core";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
import { RsaCrypto } from "./crypto";
|
||||
import { RsaPrivateKey } from "./private_key";
|
||||
import { RsaPublicKey } from "./public_key";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
|
||||
export class RsaPssProvider extends core.RsaPssProvider {
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import * as core from "webcrypto-core";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
import { RsaCrypto } from "./crypto";
|
||||
import { RsaPrivateKey } from "./private_key";
|
||||
import { RsaPublicKey } from "./public_key";
|
||||
import { setCryptoKey, getCryptoKey } from "../storage";
|
||||
|
||||
export class RsaSsaProvider extends core.RsaSsaProvider {
|
||||
|
||||
|
|
Reference in New Issue