first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
@@ -0,0 +1,23 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EncryptedPrivateKeyInfo = exports.EncryptedData = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const asn1_x509_1 = require("@peculiar/asn1-x509");
class EncryptedData extends asn1_schema_1.OctetString {
}
exports.EncryptedData = EncryptedData;
class EncryptedPrivateKeyInfo {
constructor(params = {}) {
this.encryptionAlgorithm = new asn1_x509_1.AlgorithmIdentifier();
this.encryptedData = new EncryptedData();
Object.assign(this, params);
}
}
exports.EncryptedPrivateKeyInfo = EncryptedPrivateKeyInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_x509_1.AlgorithmIdentifier })
], EncryptedPrivateKeyInfo.prototype, "encryptionAlgorithm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: EncryptedData })
], EncryptedPrivateKeyInfo.prototype, "encryptedData", void 0);
+5
View File
@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./encrypted_private_key_info"), exports);
tslib_1.__exportStar(require("./private_key_info"), exports);
+45
View File
@@ -0,0 +1,45 @@
"use strict";
var Attributes_1;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PrivateKeyInfo = exports.Attributes = exports.PrivateKey = exports.Version = void 0;
const tslib_1 = require("tslib");
const asn1_schema_1 = require("@peculiar/asn1-schema");
const asn1_x509_1 = require("@peculiar/asn1-x509");
var Version;
(function (Version) {
Version[Version["v1"] = 0] = "v1";
})(Version || (exports.Version = Version = {}));
class PrivateKey extends asn1_schema_1.OctetString {
}
exports.PrivateKey = PrivateKey;
let Attributes = Attributes_1 = class Attributes extends asn1_schema_1.AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, Attributes_1.prototype);
}
};
exports.Attributes = Attributes;
exports.Attributes = Attributes = Attributes_1 = tslib_1.__decorate([
(0, asn1_schema_1.AsnType)({ type: asn1_schema_1.AsnTypeTypes.Sequence, itemType: asn1_x509_1.Attribute })
], Attributes);
class PrivateKeyInfo {
constructor(params = {}) {
this.version = Version.v1;
this.privateKeyAlgorithm = new asn1_x509_1.AlgorithmIdentifier();
this.privateKey = new PrivateKey();
Object.assign(this, params);
}
}
exports.PrivateKeyInfo = PrivateKeyInfo;
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_schema_1.AsnPropTypes.Integer })
], PrivateKeyInfo.prototype, "version", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: asn1_x509_1.AlgorithmIdentifier })
], PrivateKeyInfo.prototype, "privateKeyAlgorithm", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: PrivateKey })
], PrivateKeyInfo.prototype, "privateKey", void 0);
tslib_1.__decorate([
(0, asn1_schema_1.AsnProp)({ type: Attributes, implicit: true, context: 0, optional: true })
], PrivateKeyInfo.prototype, "attributes", void 0);
@@ -0,0 +1,18 @@
import { __decorate } from "tslib";
import { AsnProp, OctetString } from "@peculiar/asn1-schema";
import { AlgorithmIdentifier } from "@peculiar/asn1-x509";
export class EncryptedData extends OctetString {
}
export class EncryptedPrivateKeyInfo {
constructor(params = {}) {
this.encryptionAlgorithm = new AlgorithmIdentifier();
this.encryptedData = new EncryptedData();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AlgorithmIdentifier })
], EncryptedPrivateKeyInfo.prototype, "encryptionAlgorithm", void 0);
__decorate([
AsnProp({ type: EncryptedData })
], EncryptedPrivateKeyInfo.prototype, "encryptedData", void 0);
+2
View File
@@ -0,0 +1,2 @@
export * from "./encrypted_private_key_info";
export * from "./private_key_info";
+40
View File
@@ -0,0 +1,40 @@
var Attributes_1;
import { __decorate } from "tslib";
import { AsnProp, AsnPropTypes, AsnArray, AsnType, AsnTypeTypes, OctetString, } from "@peculiar/asn1-schema";
import { AlgorithmIdentifier, Attribute } from "@peculiar/asn1-x509";
export var Version;
(function (Version) {
Version[Version["v1"] = 0] = "v1";
})(Version || (Version = {}));
export class PrivateKey extends OctetString {
}
let Attributes = Attributes_1 = class Attributes extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, Attributes_1.prototype);
}
};
Attributes = Attributes_1 = __decorate([
AsnType({ type: AsnTypeTypes.Sequence, itemType: Attribute })
], Attributes);
export { Attributes };
export class PrivateKeyInfo {
constructor(params = {}) {
this.version = Version.v1;
this.privateKeyAlgorithm = new AlgorithmIdentifier();
this.privateKey = new PrivateKey();
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], PrivateKeyInfo.prototype, "version", void 0);
__decorate([
AsnProp({ type: AlgorithmIdentifier })
], PrivateKeyInfo.prototype, "privateKeyAlgorithm", void 0);
__decorate([
AsnProp({ type: PrivateKey })
], PrivateKeyInfo.prototype, "privateKey", void 0);
__decorate([
AsnProp({ type: Attributes, implicit: true, context: 0, optional: true })
], PrivateKeyInfo.prototype, "attributes", void 0);
@@ -0,0 +1,22 @@
import { OctetString } from "@peculiar/asn1-schema";
import { AlgorithmIdentifier } from "@peculiar/asn1-x509";
/**
* ```asn1
* EncryptedData ::= OCTET STRING
* ```
*/
export declare class EncryptedData extends OctetString {
}
/**
* ```asn1
* EncryptedPrivateKeyInfo ::= SEQUENCE {
* encryptionAlgorithm AlgorithmIdentifier {{KeyEncryptionAlgorithms}},
* encryptedData EncryptedData
* }
* ```
*/
export declare class EncryptedPrivateKeyInfo {
encryptionAlgorithm: AlgorithmIdentifier;
encryptedData: EncryptedData;
constructor(params?: Partial<EncryptedPrivateKeyInfo>);
}
+2
View File
@@ -0,0 +1,2 @@
export * from "./encrypted_private_key_info";
export * from "./private_key_info";
+41
View File
@@ -0,0 +1,41 @@
import { AsnArray, OctetString } from "@peculiar/asn1-schema";
import { AlgorithmIdentifier, Attribute } from "@peculiar/asn1-x509";
/**
* ```asn1
* Version ::= INTEGER {v1(0)} (v1,...)
* ```
*/
export declare enum Version {
v1 = 0
}
/**
* ```asn1
* PrivateKey ::= OCTET STRING
* ```
*/
export declare class PrivateKey extends OctetString {
}
/**
* ```asn1
* Attributes ::= SET OF Attribute
* ```
*/
export declare class Attributes extends AsnArray<Attribute> {
constructor(items?: Attribute[]);
}
/**
* ```asn1
* PrivateKeyInfo ::= SEQUENCE {
* version Version,
* privateKeyAlgorithm AlgorithmIdentifier {{PrivateKeyAlgorithms}},
* privateKey PrivateKey,
* attributes [0] Attributes OPTIONAL }
* ```
*/
export declare class PrivateKeyInfo {
version: Version;
privateKeyAlgorithm: AlgorithmIdentifier;
privateKey: PrivateKey;
attributes?: Attributes;
constructor(params?: Partial<PrivateKeyInfo>);
}