Skip to content

Commit 1e75e0b

Browse files
committed
chore: wip
1 parent c89d6db commit 1e75e0b

43 files changed

Lines changed: 393 additions & 845 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "ts-security",
3-
"private": true,
43
"type": "module",
4+
"version": "0.0.0",
5+
"private": true,
56
"workspaces": [
67
"packages/*"
78
],
8-
"version": "0.0.0",
99
"description": "A TLS/HTTPS library with automation.",
1010
"author": "Chris Breuer <chris@stacksjs.org> (https://github.com/chrisbbreuer)",
1111
"license": "MIT",

packages/asn1/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pnpm install ts-pem
3838
After installing the package, you can import and use the PEM encoding and decoding functions:
3939

4040
```ts
41-
import { encode, decode } from 'ts-pem'
41+
import { decode, encode } from 'ts-pem'
4242

4343
// Decode a PEM-formatted string
4444
const pemString = `-----BEGIN CERTIFICATE-----
@@ -98,12 +98,12 @@ Encodes a PEM message object into a PEM-formatted string.
9898

9999
```ts
100100
interface PEMMessage {
101-
type: string; // The type of message (e.g., "RSA PRIVATE KEY")
102-
procType: ProcType | null; // Processing type information
103-
contentDomain: string | null; // Content domain (typically "RFC822")
104-
dekInfo: DEKInfo | null; // Data Encryption Key information
105-
headers: PEMHeader[]; // Additional headers
106-
body: Uint8Array; // The binary-encoded body
101+
type: string // The type of message (e.g., "RSA PRIVATE KEY")
102+
procType: ProcType | null // Processing type information
103+
contentDomain: string | null // Content domain (typically "RFC822")
104+
dekInfo: DEKInfo | null // Data Encryption Key information
105+
headers: PEMHeader[] // Additional headers
106+
body: Uint8Array // The binary-encoded body
107107
}
108108
```
109109

packages/asn1/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
],
2626
"exports": {
2727
".": {
28-
"import": "./dist/index.js",
29-
"types": "./dist/index.d.ts"
28+
"types": "./dist/index.d.ts",
29+
"import": "./dist/index.js"
3030
}
3131
},
3232
"module": "./dist/index.js",

packages/asn1/src/asn1.ts

Whitespace-only changes.

packages/asn1/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1+
export * from './asn1'
12
export * from './types'
2-
export * from './pem'

packages/asn1/src/pem.ts

Lines changed: 0 additions & 255 deletions
This file was deleted.

packages/asn1/src/types.ts

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +0,0 @@
1-
/**
2-
* TypeScript types for PEM (Privacy Enhanced Mail) implementation.
3-
*/
4-
5-
/**
6-
* Represents a PEM header with a name and array of values.
7-
*/
8-
export interface PEMHeader {
9-
name: string;
10-
values: string[];
11-
}
12-
13-
/**
14-
* Represents the processing type information in a PEM message.
15-
*/
16-
export interface ProcType {
17-
version: string;
18-
type: string;
19-
}
20-
21-
/**
22-
* Represents the Data Encryption Key information in a PEM message.
23-
*/
24-
export interface DEKInfo {
25-
algorithm: string;
26-
parameters: string | null;
27-
}
28-
29-
/**
30-
* Represents a decoded PEM message.
31-
*/
32-
export interface PEMMessage {
33-
type: string;
34-
procType: ProcType | null;
35-
contentDomain: string | null;
36-
dekInfo: DEKInfo | null;
37-
headers: PEMHeader[];
38-
body: Uint8Array;
39-
}
40-
41-
/**
42-
* Options for encoding PEM messages.
43-
*/
44-
export interface PEMEncodeOptions {
45-
maxline?: number;
46-
}

packages/asn1/test/asn1.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// import { describe, it, expect } from 'bun:test'

0 commit comments

Comments
 (0)