"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Holder_1 = require("../../../../../Class/Holder");
const Object_1 = require("../../../../../wrap/Object");
const _ids_1 = require("../../../../_ids");
class RsaAlgorithm extends Holder_1.Holder {
    constructor(system) {
        super({
            fi: ['name', 'modulusLength', 'publicExponent', 'hash'],
            fo: ['algorithm'],
        }, {
            input: {
                publicExponent: {
                    ref: true,
                },
            },
            output: {
                algorithm: {
                    ref: true,
                },
            },
        }, system, _ids_1.ID_RSA_ALGORITHM);
    }
    async f({ name, modulusLength, publicExponent, hash }, done) {
        const algorithm_ = {
            name,
            modulusLength,
            publicExponent: publicExponent.raw(),
            hash,
        };
        const algorithm = (0, Object_1.wrapObject)(algorithm_, this.__system);
        done({ algorithm });
    }
}
exports.default = RsaAlgorithm;
//# sourceMappingURL=index.js.map