@ne1410s/crypto 0.2.38 → 0.2.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/functions.d.ts +2 -0
- package/dist/interfaces.d.ts +2 -0
- package/dist/ne14_crypto.cjs.min.js +7 -11
- package/dist/ne14_crypto.esm.min.js +3 -4
- package/dist/ne14_crypto.umd.min.js +3201 -5969
- package/package.json +16 -16
package/dist/functions.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { IKeyPair_Jwk, ICsr_Params, ICsr_Result } from './interfaces';
|
|
3
|
+
import { JsonWebKey } from 'node:crypto';
|
|
2
4
|
export declare function randomString(): Promise<string>;
|
|
3
5
|
export declare function gen(): Promise<IKeyPair_Jwk>;
|
|
4
6
|
export declare function sign(text: string, privateJwk: JsonWebKey): Promise<string>;
|
package/dist/interfaces.d.ts
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var asn1js = require('asn1js');
|
|
6
4
|
var ne_text = require('@ne1410s/text');
|
|
7
5
|
|
|
8
|
-
function
|
|
9
|
-
if (e && e.__esModule) return e;
|
|
6
|
+
function _interopNamespaceDefault(e) {
|
|
10
7
|
var n = Object.create(null);
|
|
11
8
|
if (e) {
|
|
12
9
|
Object.keys(e).forEach(function (k) {
|
|
@@ -19,14 +16,14 @@ function _interopNamespace(e) {
|
|
|
19
16
|
}
|
|
20
17
|
});
|
|
21
18
|
}
|
|
22
|
-
n
|
|
19
|
+
n.default = e;
|
|
23
20
|
return Object.freeze(n);
|
|
24
21
|
}
|
|
25
22
|
|
|
26
|
-
var asn1js__namespace = /*#__PURE__*/
|
|
27
|
-
var ne_text__namespace = /*#__PURE__*/
|
|
23
|
+
var asn1js__namespace = /*#__PURE__*/_interopNamespaceDefault(asn1js);
|
|
24
|
+
var ne_text__namespace = /*#__PURE__*/_interopNamespaceDefault(ne_text);
|
|
28
25
|
|
|
29
|
-
|
|
26
|
+
/******************************************************************************
|
|
30
27
|
Copyright (c) Microsoft Corporation.
|
|
31
28
|
|
|
32
29
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -57,7 +54,7 @@ function __generator(thisArg, body) {
|
|
|
57
54
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
58
55
|
function step(op) {
|
|
59
56
|
if (f) throw new TypeError("Generator is already executing.");
|
|
60
|
-
while (_) try {
|
|
57
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
61
58
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
62
59
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
63
60
|
switch (op[0]) {
|
|
@@ -79,9 +76,8 @@ function __generator(thisArg, body) {
|
|
|
79
76
|
}
|
|
80
77
|
}
|
|
81
78
|
|
|
82
|
-
var
|
|
79
|
+
var crypto = require('node:crypto');
|
|
83
80
|
var pkijs = require('pkijs');
|
|
84
|
-
var crypto = new webcrypto.Crypto();
|
|
85
81
|
pkijs.setEngine('OpenSSL', crypto, new pkijs.CryptoEngine({ name: '', crypto: crypto, subtle: crypto.subtle }));
|
|
86
82
|
var DEF_ALGO = {
|
|
87
83
|
name: 'RSASSA-PKCS1-v1_5',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as asn1js from 'asn1js';
|
|
2
2
|
import * as ne_text from '@ne1410s/text';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/******************************************************************************
|
|
5
5
|
Copyright (c) Microsoft Corporation.
|
|
6
6
|
|
|
7
7
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -32,7 +32,7 @@ function __generator(thisArg, body) {
|
|
|
32
32
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
33
33
|
function step(op) {
|
|
34
34
|
if (f) throw new TypeError("Generator is already executing.");
|
|
35
|
-
while (_) try {
|
|
35
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
36
36
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
37
37
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
38
38
|
switch (op[0]) {
|
|
@@ -54,9 +54,8 @@ function __generator(thisArg, body) {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
var
|
|
57
|
+
var crypto = require('node:crypto');
|
|
58
58
|
var pkijs = require('pkijs');
|
|
59
|
-
var crypto = new webcrypto.Crypto();
|
|
60
59
|
pkijs.setEngine('OpenSSL', crypto, new pkijs.CryptoEngine({ name: '', crypto: crypto, subtle: crypto.subtle }));
|
|
61
60
|
var DEF_ALGO = {
|
|
62
61
|
name: 'RSASSA-PKCS1-v1_5',
|