Files
NapCatQQ/.pnpm-store/v3/files/91/0c08cd055f20294bd19fd316b5fc071ba06799e5a4fc2e3c4f459e5fdb07edaef84d549d4dc7b4fdf5588a8d0d1150c5d46a7a18d1cf0ba26793484f306802
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

34 lines
1.3 KiB
Plaintext

import { __decorate } from "tslib";
import { AsnProp, AsnConvert, AsnPropTypes } from "@peculiar/asn1-schema";
import { AlgorithmIdentifier } from "@peculiar/asn1-x509";
import { id_mgf1, id_RSASSA_PSS } from "../object_identifiers";
import { sha1, mgf1SHA1 } from "../algorithms";
export class RsaSaPssParams {
constructor(params = {}) {
this.hashAlgorithm = new AlgorithmIdentifier(sha1);
this.maskGenAlgorithm = new AlgorithmIdentifier({
algorithm: id_mgf1,
parameters: AsnConvert.serialize(sha1),
});
this.saltLength = 20;
this.trailerField = 1;
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AlgorithmIdentifier, context: 0, defaultValue: sha1 })
], RsaSaPssParams.prototype, "hashAlgorithm", void 0);
__decorate([
AsnProp({ type: AlgorithmIdentifier, context: 1, defaultValue: mgf1SHA1 })
], RsaSaPssParams.prototype, "maskGenAlgorithm", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Integer, context: 2, defaultValue: 20 })
], RsaSaPssParams.prototype, "saltLength", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Integer, context: 3, defaultValue: 1 })
], RsaSaPssParams.prototype, "trailerField", void 0);
export const RSASSA_PSS = new AlgorithmIdentifier({
algorithm: id_RSASSA_PSS,
parameters: AsnConvert.serialize(new RsaSaPssParams()),
});