import * as asn1js from "asn1js"; import * as pvutils from "pvutils"; import { AlgorithmIdentifier, AlgorithmIdentifierJson, AlgorithmIdentifierSchema } from "./AlgorithmIdentifier"; import { EMPTY_STRING } from "./constants"; import { AsnError } from "./errors"; import { PkiObject, PkiObjectParameters } from "./PkiObject"; import * as Schema from "./Schema";
export type RSASSAPSSParamsParameters = PkiObjectParameters & Partial<IRSASSAPSSParams>;
/** * Represents the RSASSAPSSParams structure described in [RFC4055](https://datatracker.ietf.org/doc/html/rfc4055)
*/
export class RSASSAPSSParams extends PkiObject implements IRSASSAPSSParams {
public hashAlgorithm!: AlgorithmIdentifier; public maskGenAlgorithm!: AlgorithmIdentifier; public saltLength!: number; public trailerField!: number;
/** * Initializes a new instance of the {@link RSASSAPSSParams} class * @param parameters Initialization parameters
*/
constructor(parameters: RSASSAPSSParamsParameters = {}) { super();
// Get internal properties from parsed schema if (HASH_ALGORITHM in asn1.result) this.hashAlgorithm = new AlgorithmIdentifier({ schema: asn1.result.hashAlgorithm });
if (MASK_GEN_ALGORITHM in asn1.result) this.maskGenAlgorithm = new AlgorithmIdentifier({ schema: asn1.result.maskGenAlgorithm });
if (SALT_LENGTH in asn1.result) this.saltLength = asn1.result.saltLength.valueBlock.valueDec;
if (TRAILER_FIELD in asn1.result) this.trailerField = asn1.result.trailerField.valueBlock.valueDec;
}
public toSchema(): asn1js.Sequence { //#region Create array for output sequence const outputArray = [];
//#region Construct and return new ASN.1 schema for this object return (new asn1js.Sequence({
value: outputArray
})); //#endregion
}
public toJSON(): RSASSAPSSParamsJson { const res: RSASSAPSSParamsJson = {};
if (!this.hashAlgorithm.isEqual(RSASSAPSSParams.defaultValues(HASH_ALGORITHM))) {
res.hashAlgorithm = this.hashAlgorithm.toJSON();
}
if (!this.maskGenAlgorithm.isEqual(RSASSAPSSParams.defaultValues(MASK_GEN_ALGORITHM))) {
res.maskGenAlgorithm = this.maskGenAlgorithm.toJSON();
}
if (this.saltLength !== RSASSAPSSParams.defaultValues(SALT_LENGTH)) {
res.saltLength = this.saltLength;
}
if (this.trailerField !== RSASSAPSSParams.defaultValues(TRAILER_FIELD)) {
res.trailerField = this.trailerField;
}
return res;
}
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.17Bemerkung:
(vorverarbeitet am 2026-06-06)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.