diff --git a/src/mechs/aes/aes_cbc.ts b/src/mechs/aes/aes_cbc.ts index 527a4a5..c5d7eb5 100644 --- a/src/mechs/aes/aes_cbc.ts +++ b/src/mechs/aes/aes_cbc.ts @@ -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 { diff --git a/src/mechs/aes/aes_cmac.ts b/src/mechs/aes/aes_cmac.ts index 78d6448..9032e8b 100644 --- a/src/mechs/aes/aes_cmac.ts +++ b/src/mechs/aes/aes_cmac.ts @@ -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 diff --git a/src/mechs/aes/aes_ctr.ts b/src/mechs/aes/aes_ctr.ts index 95bae84..f341774 100644 --- a/src/mechs/aes/aes_ctr.ts +++ b/src/mechs/aes/aes_ctr.ts @@ -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 { diff --git a/src/mechs/aes/aes_ecb.ts b/src/mechs/aes/aes_ecb.ts index 05f5ffe..1280a3f 100644 --- a/src/mechs/aes/aes_ecb.ts +++ b/src/mechs/aes/aes_ecb.ts @@ -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 { diff --git a/src/mechs/aes/aes_gcm.ts b/src/mechs/aes/aes_gcm.ts index 0d4e197..71b406e 100644 --- a/src/mechs/aes/aes_gcm.ts +++ b/src/mechs/aes/aes_gcm.ts @@ -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 { diff --git a/src/mechs/aes/aes_kw.ts b/src/mechs/aes/aes_kw.ts index 2e3e1b3..161200a 100644 --- a/src/mechs/aes/aes_kw.ts +++ b/src/mechs/aes/aes_kw.ts @@ -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 { diff --git a/src/mechs/aes/crypto.ts b/src/mechs/aes/crypto.ts index 090ef37..3cbfed4 100644 --- a/src/mechs/aes/crypto.ts +++ b/src/mechs/aes/crypto.ts @@ -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 { diff --git a/src/mechs/des/crypto.ts b/src/mechs/des/crypto.ts index 5b0fc90..5f76048 100644 --- a/src/mechs/des/crypto.ts +++ b/src/mechs/des/crypto.ts @@ -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 { diff --git a/src/mechs/des/des_cbc.ts b/src/mechs/des/des_cbc.ts index f180c69..bdf5ae3 100644 --- a/src/mechs/des/des_cbc.ts +++ b/src/mechs/des/des_cbc.ts @@ -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; diff --git a/src/mechs/des/des_ede3_cbc.ts b/src/mechs/des/des_ede3_cbc.ts index 9c65efd..b3c02e3 100644 --- a/src/mechs/des/des_ede3_cbc.ts +++ b/src/mechs/des/des_ede3_cbc.ts @@ -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; diff --git a/src/mechs/ec/crypto.ts b/src/mechs/ec/crypto.ts index 23c8646..69a84dc 100644 --- a/src/mechs/ec/crypto.ts +++ b/src/mechs/ec/crypto.ts @@ -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 { diff --git a/src/mechs/ec/ec_dh.ts b/src/mechs/ec/ec_dh.ts index 0cdec6c..21d412e 100644 --- a/src/mechs/ec/ec_dh.ts +++ b/src/mechs/ec/ec_dh.ts @@ -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 { diff --git a/src/mechs/ec/ec_dsa.ts b/src/mechs/ec/ec_dsa.ts index fc88ab9..c3988c1 100644 --- a/src/mechs/ec/ec_dsa.ts +++ b/src/mechs/ec/ec_dsa.ts @@ -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 { diff --git a/src/mechs/ec/private_key.ts b/src/mechs/ec/private_key.ts index 28c1f72..c1bd013 100644 --- a/src/mechs/ec/private_key.ts +++ b/src/mechs/ec/private_key.ts @@ -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; diff --git a/src/mechs/ec/public_key.ts b/src/mechs/ec/public_key.ts index 8a16c51..60d5517 100644 --- a/src/mechs/ec/public_key.ts +++ b/src/mechs/ec/public_key.ts @@ -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 { diff --git a/src/mechs/ed/crypto.ts b/src/mechs/ed/crypto.ts index a1b9e4e..5089f73 100644 --- a/src/mechs/ed/crypto.ts +++ b/src/mechs/ed/crypto.ts @@ -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 { diff --git a/src/mechs/ed/ecdh_es.ts b/src/mechs/ed/ecdh_es.ts index 7dcc2f0..0b29d7b 100644 --- a/src/mechs/ed/ecdh_es.ts +++ b/src/mechs/ed/ecdh_es.ts @@ -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 { diff --git a/src/mechs/ed/eddsa.ts b/src/mechs/ed/eddsa.ts index 807371d..516ba3e 100644 --- a/src/mechs/ed/eddsa.ts +++ b/src/mechs/ed/eddsa.ts @@ -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 { diff --git a/src/mechs/ed/private_key.ts b/src/mechs/ed/private_key.ts index 0040446..443f208 100644 --- a/src/mechs/ed/private_key.ts +++ b/src/mechs/ed/private_key.ts @@ -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; diff --git a/src/mechs/ed/public_key.ts b/src/mechs/ed/public_key.ts index 3262238..ae9ffa6 100644 --- a/src/mechs/ed/public_key.ts +++ b/src/mechs/ed/public_key.ts @@ -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 { diff --git a/src/mechs/hkdf/hkdf.ts b/src/mechs/hkdf/hkdf.ts index 58a0e21..553b550 100644 --- a/src/mechs/hkdf/hkdf.ts +++ b/src/mechs/hkdf/hkdf.ts @@ -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 { diff --git a/src/mechs/hmac/hmac.ts b/src/mechs/hmac/hmac.ts index 1421af4..340a4c5 100644 --- a/src/mechs/hmac/hmac.ts +++ b/src/mechs/hmac/hmac.ts @@ -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 { diff --git a/src/mechs/pbkdf/pbkdf2.ts b/src/mechs/pbkdf/pbkdf2.ts index 961c514..c707e92 100644 --- a/src/mechs/pbkdf/pbkdf2.ts +++ b/src/mechs/pbkdf/pbkdf2.ts @@ -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 { diff --git a/src/mechs/rsa/crypto.ts b/src/mechs/rsa/crypto.ts index a2fa260..0b80282 100644 --- a/src/mechs/rsa/crypto.ts +++ b/src/mechs/rsa/crypto.ts @@ -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; diff --git a/src/mechs/rsa/private_key.ts b/src/mechs/rsa/private_key.ts index 2545147..c3a7559 100644 --- a/src/mechs/rsa/private_key.ts +++ b/src/mechs/rsa/private_key.ts @@ -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; diff --git a/src/mechs/rsa/public_key.ts b/src/mechs/rsa/public_key.ts index ab8c430..0cc6ec1 100644 --- a/src/mechs/rsa/public_key.ts +++ b/src/mechs/rsa/public_key.ts @@ -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; diff --git a/src/mechs/rsa/rsa_es.ts b/src/mechs/rsa/rsa_es.ts index fb24844..23b1e98 100644 --- a/src/mechs/rsa/rsa_es.ts +++ b/src/mechs/rsa/rsa_es.ts @@ -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 { diff --git a/src/mechs/rsa/rsa_oaep.ts b/src/mechs/rsa/rsa_oaep.ts index 03941a3..81fac3b 100644 --- a/src/mechs/rsa/rsa_oaep.ts +++ b/src/mechs/rsa/rsa_oaep.ts @@ -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 diff --git a/src/mechs/rsa/rsa_pss.ts b/src/mechs/rsa/rsa_pss.ts index 12ddb0d..358514a 100644 --- a/src/mechs/rsa/rsa_pss.ts +++ b/src/mechs/rsa/rsa_pss.ts @@ -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 { diff --git a/src/mechs/rsa/rsa_ssa.ts b/src/mechs/rsa/rsa_ssa.ts index 3b6bb98..e0ff26a 100644 --- a/src/mechs/rsa/rsa_ssa.ts +++ b/src/mechs/rsa/rsa_ssa.ts @@ -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 {