style(lint): fix lint errors
This commit is contained in:
parent
5175704e8e
commit
d0ea632eea
|
@ -3,6 +3,6 @@ import { CryptoKey } from "./key";
|
||||||
export class SymmetricKey extends CryptoKey {
|
export class SymmetricKey extends CryptoKey {
|
||||||
|
|
||||||
public override readonly kty = "oct";
|
public override readonly kty = "oct";
|
||||||
public override readonly type: "secret" = "secret";
|
public override readonly type = "secret" as const;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { AsymmetricKey } from "../../keys";
|
||||||
import { getOidByNamedCurve } from "./helper";
|
import { getOidByNamedCurve } from "./helper";
|
||||||
|
|
||||||
export class EcPrivateKey extends AsymmetricKey implements IJsonConvertible {
|
export class EcPrivateKey extends AsymmetricKey implements IJsonConvertible {
|
||||||
public readonly type: "private" = "private";
|
public readonly type = "private" as const;
|
||||||
public override algorithm!: EcKeyAlgorithm;
|
public override algorithm!: EcKeyAlgorithm;
|
||||||
|
|
||||||
public getKey() {
|
public getKey() {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { getOidByNamedCurve } from "./helper";
|
||||||
|
|
||||||
export class EcPublicKey extends AsymmetricKey implements IJsonConvertible {
|
export class EcPublicKey extends AsymmetricKey implements IJsonConvertible {
|
||||||
|
|
||||||
public readonly type: "public" = "public";
|
public readonly type = "public" as const;
|
||||||
public override algorithm!: EcKeyAlgorithm;
|
public override algorithm!: EcKeyAlgorithm;
|
||||||
|
|
||||||
public getKey() {
|
public getKey() {
|
||||||
|
@ -39,7 +39,7 @@ export class EcPublicKey extends AsymmetricKey implements IJsonConvertible {
|
||||||
keyInfo.publicKeyAlgorithm.parameters = AsnSerializer.serialize(
|
keyInfo.publicKeyAlgorithm.parameters = AsnSerializer.serialize(
|
||||||
new core.asn1.ObjectIdentifier(getOidByNamedCurve(json.crv)),
|
new core.asn1.ObjectIdentifier(getOidByNamedCurve(json.crv)),
|
||||||
);
|
);
|
||||||
keyInfo.publicKey = AsnSerializer.toASN(key).valueHex;
|
keyInfo.publicKey = (AsnSerializer.toASN(key) as any).valueHex;
|
||||||
|
|
||||||
this.data = Buffer.from(AsnSerializer.serialize(keyInfo));
|
this.data = Buffer.from(AsnSerializer.serialize(keyInfo));
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { AsymmetricKey } from "../../keys";
|
||||||
import { getOidByNamedCurve } from "./helper";
|
import { getOidByNamedCurve } from "./helper";
|
||||||
|
|
||||||
export class EdPrivateKey extends AsymmetricKey implements IJsonConvertible {
|
export class EdPrivateKey extends AsymmetricKey implements IJsonConvertible {
|
||||||
public readonly type: "private" = "private";
|
public readonly type = "private" as const;
|
||||||
public override algorithm!: EcKeyAlgorithm;
|
public override algorithm!: EcKeyAlgorithm;
|
||||||
|
|
||||||
public getKey() {
|
public getKey() {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { getOidByNamedCurve } from "./helper";
|
||||||
|
|
||||||
export class EdPublicKey extends AsymmetricKey implements IJsonConvertible {
|
export class EdPublicKey extends AsymmetricKey implements IJsonConvertible {
|
||||||
|
|
||||||
public readonly type: "public" = "public";
|
public readonly type = "public" as const;
|
||||||
public override algorithm!: EcKeyAlgorithm;
|
public override algorithm!: EcKeyAlgorithm;
|
||||||
|
|
||||||
public getKey() {
|
public getKey() {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { AsymmetricKey } from "../../keys";
|
||||||
import { getJwkAlgorithm } from "./helper";
|
import { getJwkAlgorithm } from "./helper";
|
||||||
|
|
||||||
export class RsaPrivateKey extends AsymmetricKey {
|
export class RsaPrivateKey extends AsymmetricKey {
|
||||||
public readonly type: "private" = "private";
|
public readonly type = "private" as const;
|
||||||
public override algorithm!: RsaHashedKeyAlgorithm;
|
public override algorithm!: RsaHashedKeyAlgorithm;
|
||||||
|
|
||||||
public getKey() {
|
public getKey() {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { AsymmetricKey } from "../../keys/asymmetric";
|
||||||
import { getJwkAlgorithm } from "./helper";
|
import { getJwkAlgorithm } from "./helper";
|
||||||
|
|
||||||
export class RsaPublicKey extends AsymmetricKey {
|
export class RsaPublicKey extends AsymmetricKey {
|
||||||
public readonly type: "public" = "public";
|
public readonly type = "public" as const;
|
||||||
public override algorithm!: RsaHashedKeyAlgorithm;
|
public override algorithm!: RsaHashedKeyAlgorithm;
|
||||||
|
|
||||||
public getKey() {
|
public getKey() {
|
||||||
|
|
Reference in New Issue