cas-typescript-sdk 1.0.54 → 1.0.55
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/index.js +52 -52
- package/index.win32-x64-msvc.node +0 -0
- package/lib/asymmetric/RSAWrapper.d.ts +1 -1
- package/lib/asymmetric/RSAWrapper.d.ts.map +1 -1
- package/lib/asymmetric/RSAWrapper.js +9 -5
- package/lib/asymmetric/RSAWrapper.js.map +1 -1
- package/lib/asymmetric/index.d.ts +3 -2
- package/lib/asymmetric/index.d.ts.map +1 -1
- package/lib/asymmetric/index.js +5 -2
- package/lib/asymmetric/index.js.map +1 -1
- package/lib/digital-signature/digital-siganture-sha-512.d.ts +2 -2
- package/lib/digital-signature/digital-siganture-sha-512.d.ts.map +1 -1
- package/lib/digital-signature/digital-siganture-sha-512.js +8 -4
- package/lib/digital-signature/digital-siganture-sha-512.js.map +1 -1
- package/lib/digital-signature/digital-signature-base.d.ts +1 -1
- package/lib/digital-signature/digital-signature-base.d.ts.map +1 -1
- package/lib/digital-signature/digital-signature-base.js +2 -1
- package/lib/digital-signature/digital-signature-factory.d.ts +1 -1
- package/lib/digital-signature/digital-signature-factory.d.ts.map +1 -1
- package/lib/digital-signature/digital-signature-factory.js +11 -7
- package/lib/digital-signature/digital-signature-factory.js.map +1 -1
- package/lib/digital-signature/digital-signaturte-sha-256.d.ts +4 -4
- package/lib/digital-signature/digital-signaturte-sha-256.d.ts.map +1 -1
- package/lib/digital-signature/digital-signaturte-sha-256.js +10 -6
- package/lib/digital-signature/digital-signaturte-sha-256.js.map +1 -1
- package/lib/digital-signature/index.d.ts +5 -5
- package/lib/digital-signature/index.d.ts.map +1 -1
- package/lib/digital-signature/index.js +11 -6
- package/lib/digital-signature/index.js.map +1 -1
- package/lib/hashers/blake2-wrapper.d.ts +1 -1
- package/lib/hashers/blake2-wrapper.d.ts.map +1 -1
- package/lib/hashers/blake2-wrapper.js +10 -6
- package/lib/hashers/blake2-wrapper.js.map +1 -1
- package/lib/hashers/hasher-base.js +2 -1
- package/lib/hashers/hasher-factory.d.ts +1 -1
- package/lib/hashers/hasher-factory.d.ts.map +1 -1
- package/lib/hashers/hasher-factory.js +11 -7
- package/lib/hashers/hasher-factory.js.map +1 -1
- package/lib/hashers/hasher-type.js +5 -2
- package/lib/hashers/hasher-type.js.map +1 -1
- package/lib/hashers/index.d.ts +4 -4
- package/lib/hashers/index.d.ts.map +1 -1
- package/lib/hashers/index.js +11 -5
- package/lib/hashers/index.js.map +1 -1
- package/lib/hashers/sha-wrapper.d.ts +1 -1
- package/lib/hashers/sha-wrapper.d.ts.map +1 -1
- package/lib/hashers/sha-wrapper.js +10 -6
- package/lib/hashers/sha-wrapper.js.map +1 -1
- package/lib/hybrid/hpke.d.ts +1 -1
- package/lib/hybrid/hpke.d.ts.map +1 -1
- package/lib/hybrid/hpke.js +10 -6
- package/lib/hybrid/hpke.js.map +1 -1
- package/lib/hybrid/index.d.ts +1 -1
- package/lib/hybrid/index.d.ts.map +1 -1
- package/lib/hybrid/index.js +5 -2
- package/lib/hybrid/index.js.map +1 -1
- package/lib/index.d.ts +10 -41
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +26 -41
- package/lib/index.js.map +1 -1
- package/lib/key_exchange/index.d.ts +2 -2
- package/lib/key_exchange/index.d.ts.map +1 -1
- package/lib/key_exchange/index.js +5 -3
- package/lib/key_exchange/index.js.map +1 -1
- package/lib/key_exchange/x25519.d.ts +1 -1
- package/lib/key_exchange/x25519.d.ts.map +1 -1
- package/lib/key_exchange/x25519.js +8 -4
- package/lib/key_exchange/x25519.js.map +1 -1
- package/lib/message/hmac.js +8 -4
- package/lib/message/hmac.js.map +1 -1
- package/lib/message/index.d.ts +1 -1
- package/lib/message/index.d.ts.map +1 -1
- package/lib/message/index.js +5 -2
- package/lib/message/index.js.map +1 -1
- package/lib/password-hashers/argon2-wrapper.d.ts +1 -1
- package/lib/password-hashers/argon2-wrapper.d.ts.map +1 -1
- package/lib/password-hashers/argon2-wrapper.js +9 -5
- package/lib/password-hashers/argon2-wrapper.js.map +1 -1
- package/lib/password-hashers/bcrypt-wrapper.d.ts +1 -1
- package/lib/password-hashers/bcrypt-wrapper.d.ts.map +1 -1
- package/lib/password-hashers/bcrypt-wrapper.js +9 -5
- package/lib/password-hashers/bcrypt-wrapper.js.map +1 -1
- package/lib/password-hashers/index.d.ts +5 -5
- package/lib/password-hashers/index.d.ts.map +1 -1
- package/lib/password-hashers/index.js +13 -6
- package/lib/password-hashers/index.js.map +1 -1
- package/lib/password-hashers/password-hasher-base.js +2 -1
- package/lib/password-hashers/password-hasher-factory.d.ts +1 -1
- package/lib/password-hashers/password-hasher-factory.d.ts.map +1 -1
- package/lib/password-hashers/password-hasher-factory.js +14 -10
- package/lib/password-hashers/password-hasher-factory.js.map +1 -1
- package/lib/password-hashers/password-hasher-type.js +5 -2
- package/lib/password-hashers/password-hasher-type.js.map +1 -1
- package/lib/password-hashers/scrypt-wrapper.d.ts +1 -1
- package/lib/password-hashers/scrypt-wrapper.d.ts.map +1 -1
- package/lib/password-hashers/scrypt-wrapper.js +9 -5
- package/lib/password-hashers/scrypt-wrapper.js.map +1 -1
- package/lib/signature/ed25519-wrapper.d.ts +2 -2
- package/lib/signature/ed25519-wrapper.d.ts.map +1 -1
- package/lib/signature/ed25519-wrapper.js +9 -5
- package/lib/signature/ed25519-wrapper.js.map +1 -1
- package/lib/signature/index.d.ts +1 -1
- package/lib/signature/index.d.ts.map +1 -1
- package/lib/signature/index.js +5 -2
- package/lib/signature/index.js.map +1 -1
- package/lib/sponges/ascon-wrapper.js +10 -6
- package/lib/sponges/ascon-wrapper.js.map +1 -1
- package/lib/sponges/index.d.ts +1 -1
- package/lib/sponges/index.d.ts.map +1 -1
- package/lib/sponges/index.js +5 -2
- package/lib/sponges/index.js.map +1 -1
- package/lib/symmetric/aes-wrapper.js +15 -11
- package/lib/symmetric/aes-wrapper.js.map +1 -1
- package/lib/symmetric/index.d.ts +1 -1
- package/lib/symmetric/index.d.ts.map +1 -1
- package/lib/symmetric/index.js +5 -2
- package/lib/symmetric/index.js.map +1 -1
- package/package.json +2 -3
package/index.js
CHANGED
|
@@ -77,8 +77,8 @@ function requireNative() {
|
|
|
77
77
|
try {
|
|
78
78
|
const binding = require('cas-typescript-sdk-android-arm64')
|
|
79
79
|
const bindingPackageVersion = require('cas-typescript-sdk-android-arm64/package.json').version
|
|
80
|
-
if (bindingPackageVersion !== '1.0.
|
|
81
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
80
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
81
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
82
82
|
}
|
|
83
83
|
return binding
|
|
84
84
|
} catch (e) {
|
|
@@ -93,8 +93,8 @@ function requireNative() {
|
|
|
93
93
|
try {
|
|
94
94
|
const binding = require('cas-typescript-sdk-android-arm-eabi')
|
|
95
95
|
const bindingPackageVersion = require('cas-typescript-sdk-android-arm-eabi/package.json').version
|
|
96
|
-
if (bindingPackageVersion !== '1.0.
|
|
97
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
96
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
97
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
98
98
|
}
|
|
99
99
|
return binding
|
|
100
100
|
} catch (e) {
|
|
@@ -114,8 +114,8 @@ function requireNative() {
|
|
|
114
114
|
try {
|
|
115
115
|
const binding = require('cas-typescript-sdk-win32-x64-gnu')
|
|
116
116
|
const bindingPackageVersion = require('cas-typescript-sdk-win32-x64-gnu/package.json').version
|
|
117
|
-
if (bindingPackageVersion !== '1.0.
|
|
118
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
117
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
118
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
119
119
|
}
|
|
120
120
|
return binding
|
|
121
121
|
} catch (e) {
|
|
@@ -130,8 +130,8 @@ function requireNative() {
|
|
|
130
130
|
try {
|
|
131
131
|
const binding = require('cas-typescript-sdk-win32-x64-msvc')
|
|
132
132
|
const bindingPackageVersion = require('cas-typescript-sdk-win32-x64-msvc/package.json').version
|
|
133
|
-
if (bindingPackageVersion !== '1.0.
|
|
134
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
133
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
134
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
135
135
|
}
|
|
136
136
|
return binding
|
|
137
137
|
} catch (e) {
|
|
@@ -147,8 +147,8 @@ function requireNative() {
|
|
|
147
147
|
try {
|
|
148
148
|
const binding = require('cas-typescript-sdk-win32-ia32-msvc')
|
|
149
149
|
const bindingPackageVersion = require('cas-typescript-sdk-win32-ia32-msvc/package.json').version
|
|
150
|
-
if (bindingPackageVersion !== '1.0.
|
|
151
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
150
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
151
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
152
152
|
}
|
|
153
153
|
return binding
|
|
154
154
|
} catch (e) {
|
|
@@ -163,8 +163,8 @@ function requireNative() {
|
|
|
163
163
|
try {
|
|
164
164
|
const binding = require('cas-typescript-sdk-win32-arm64-msvc')
|
|
165
165
|
const bindingPackageVersion = require('cas-typescript-sdk-win32-arm64-msvc/package.json').version
|
|
166
|
-
if (bindingPackageVersion !== '1.0.
|
|
167
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
166
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
167
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
168
168
|
}
|
|
169
169
|
return binding
|
|
170
170
|
} catch (e) {
|
|
@@ -182,8 +182,8 @@ function requireNative() {
|
|
|
182
182
|
try {
|
|
183
183
|
const binding = require('cas-typescript-sdk-darwin-universal')
|
|
184
184
|
const bindingPackageVersion = require('cas-typescript-sdk-darwin-universal/package.json').version
|
|
185
|
-
if (bindingPackageVersion !== '1.0.
|
|
186
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
185
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
186
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
187
187
|
}
|
|
188
188
|
return binding
|
|
189
189
|
} catch (e) {
|
|
@@ -198,8 +198,8 @@ function requireNative() {
|
|
|
198
198
|
try {
|
|
199
199
|
const binding = require('cas-typescript-sdk-darwin-x64')
|
|
200
200
|
const bindingPackageVersion = require('cas-typescript-sdk-darwin-x64/package.json').version
|
|
201
|
-
if (bindingPackageVersion !== '1.0.
|
|
202
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
201
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
202
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
203
203
|
}
|
|
204
204
|
return binding
|
|
205
205
|
} catch (e) {
|
|
@@ -214,8 +214,8 @@ function requireNative() {
|
|
|
214
214
|
try {
|
|
215
215
|
const binding = require('cas-typescript-sdk-darwin-arm64')
|
|
216
216
|
const bindingPackageVersion = require('cas-typescript-sdk-darwin-arm64/package.json').version
|
|
217
|
-
if (bindingPackageVersion !== '1.0.
|
|
218
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
217
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
218
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
219
219
|
}
|
|
220
220
|
return binding
|
|
221
221
|
} catch (e) {
|
|
@@ -234,8 +234,8 @@ function requireNative() {
|
|
|
234
234
|
try {
|
|
235
235
|
const binding = require('cas-typescript-sdk-freebsd-x64')
|
|
236
236
|
const bindingPackageVersion = require('cas-typescript-sdk-freebsd-x64/package.json').version
|
|
237
|
-
if (bindingPackageVersion !== '1.0.
|
|
238
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
237
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
238
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
239
239
|
}
|
|
240
240
|
return binding
|
|
241
241
|
} catch (e) {
|
|
@@ -250,8 +250,8 @@ function requireNative() {
|
|
|
250
250
|
try {
|
|
251
251
|
const binding = require('cas-typescript-sdk-freebsd-arm64')
|
|
252
252
|
const bindingPackageVersion = require('cas-typescript-sdk-freebsd-arm64/package.json').version
|
|
253
|
-
if (bindingPackageVersion !== '1.0.
|
|
254
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
253
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
254
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
255
255
|
}
|
|
256
256
|
return binding
|
|
257
257
|
} catch (e) {
|
|
@@ -271,8 +271,8 @@ function requireNative() {
|
|
|
271
271
|
try {
|
|
272
272
|
const binding = require('cas-typescript-sdk-linux-x64-musl')
|
|
273
273
|
const bindingPackageVersion = require('cas-typescript-sdk-linux-x64-musl/package.json').version
|
|
274
|
-
if (bindingPackageVersion !== '1.0.
|
|
275
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
274
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
275
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
276
276
|
}
|
|
277
277
|
return binding
|
|
278
278
|
} catch (e) {
|
|
@@ -287,8 +287,8 @@ function requireNative() {
|
|
|
287
287
|
try {
|
|
288
288
|
const binding = require('cas-typescript-sdk-linux-x64-gnu')
|
|
289
289
|
const bindingPackageVersion = require('cas-typescript-sdk-linux-x64-gnu/package.json').version
|
|
290
|
-
if (bindingPackageVersion !== '1.0.
|
|
291
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
290
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
291
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
292
292
|
}
|
|
293
293
|
return binding
|
|
294
294
|
} catch (e) {
|
|
@@ -305,8 +305,8 @@ function requireNative() {
|
|
|
305
305
|
try {
|
|
306
306
|
const binding = require('cas-typescript-sdk-linux-arm64-musl')
|
|
307
307
|
const bindingPackageVersion = require('cas-typescript-sdk-linux-arm64-musl/package.json').version
|
|
308
|
-
if (bindingPackageVersion !== '1.0.
|
|
309
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
308
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
309
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
310
310
|
}
|
|
311
311
|
return binding
|
|
312
312
|
} catch (e) {
|
|
@@ -321,8 +321,8 @@ function requireNative() {
|
|
|
321
321
|
try {
|
|
322
322
|
const binding = require('cas-typescript-sdk-linux-arm64-gnu')
|
|
323
323
|
const bindingPackageVersion = require('cas-typescript-sdk-linux-arm64-gnu/package.json').version
|
|
324
|
-
if (bindingPackageVersion !== '1.0.
|
|
325
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
324
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
325
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
326
326
|
}
|
|
327
327
|
return binding
|
|
328
328
|
} catch (e) {
|
|
@@ -339,8 +339,8 @@ function requireNative() {
|
|
|
339
339
|
try {
|
|
340
340
|
const binding = require('cas-typescript-sdk-linux-arm-musleabihf')
|
|
341
341
|
const bindingPackageVersion = require('cas-typescript-sdk-linux-arm-musleabihf/package.json').version
|
|
342
|
-
if (bindingPackageVersion !== '1.0.
|
|
343
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
342
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
343
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
344
344
|
}
|
|
345
345
|
return binding
|
|
346
346
|
} catch (e) {
|
|
@@ -355,8 +355,8 @@ function requireNative() {
|
|
|
355
355
|
try {
|
|
356
356
|
const binding = require('cas-typescript-sdk-linux-arm-gnueabihf')
|
|
357
357
|
const bindingPackageVersion = require('cas-typescript-sdk-linux-arm-gnueabihf/package.json').version
|
|
358
|
-
if (bindingPackageVersion !== '1.0.
|
|
359
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
358
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
359
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
360
360
|
}
|
|
361
361
|
return binding
|
|
362
362
|
} catch (e) {
|
|
@@ -373,8 +373,8 @@ function requireNative() {
|
|
|
373
373
|
try {
|
|
374
374
|
const binding = require('cas-typescript-sdk-linux-loong64-musl')
|
|
375
375
|
const bindingPackageVersion = require('cas-typescript-sdk-linux-loong64-musl/package.json').version
|
|
376
|
-
if (bindingPackageVersion !== '1.0.
|
|
377
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
376
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
377
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
378
378
|
}
|
|
379
379
|
return binding
|
|
380
380
|
} catch (e) {
|
|
@@ -389,8 +389,8 @@ function requireNative() {
|
|
|
389
389
|
try {
|
|
390
390
|
const binding = require('cas-typescript-sdk-linux-loong64-gnu')
|
|
391
391
|
const bindingPackageVersion = require('cas-typescript-sdk-linux-loong64-gnu/package.json').version
|
|
392
|
-
if (bindingPackageVersion !== '1.0.
|
|
393
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
392
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
393
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
394
394
|
}
|
|
395
395
|
return binding
|
|
396
396
|
} catch (e) {
|
|
@@ -407,8 +407,8 @@ function requireNative() {
|
|
|
407
407
|
try {
|
|
408
408
|
const binding = require('cas-typescript-sdk-linux-riscv64-musl')
|
|
409
409
|
const bindingPackageVersion = require('cas-typescript-sdk-linux-riscv64-musl/package.json').version
|
|
410
|
-
if (bindingPackageVersion !== '1.0.
|
|
411
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
410
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
411
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
412
412
|
}
|
|
413
413
|
return binding
|
|
414
414
|
} catch (e) {
|
|
@@ -423,8 +423,8 @@ function requireNative() {
|
|
|
423
423
|
try {
|
|
424
424
|
const binding = require('cas-typescript-sdk-linux-riscv64-gnu')
|
|
425
425
|
const bindingPackageVersion = require('cas-typescript-sdk-linux-riscv64-gnu/package.json').version
|
|
426
|
-
if (bindingPackageVersion !== '1.0.
|
|
427
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
426
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
427
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
428
428
|
}
|
|
429
429
|
return binding
|
|
430
430
|
} catch (e) {
|
|
@@ -440,8 +440,8 @@ function requireNative() {
|
|
|
440
440
|
try {
|
|
441
441
|
const binding = require('cas-typescript-sdk-linux-ppc64-gnu')
|
|
442
442
|
const bindingPackageVersion = require('cas-typescript-sdk-linux-ppc64-gnu/package.json').version
|
|
443
|
-
if (bindingPackageVersion !== '1.0.
|
|
444
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
443
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
444
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
445
445
|
}
|
|
446
446
|
return binding
|
|
447
447
|
} catch (e) {
|
|
@@ -456,8 +456,8 @@ function requireNative() {
|
|
|
456
456
|
try {
|
|
457
457
|
const binding = require('cas-typescript-sdk-linux-s390x-gnu')
|
|
458
458
|
const bindingPackageVersion = require('cas-typescript-sdk-linux-s390x-gnu/package.json').version
|
|
459
|
-
if (bindingPackageVersion !== '1.0.
|
|
460
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
459
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
460
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
461
461
|
}
|
|
462
462
|
return binding
|
|
463
463
|
} catch (e) {
|
|
@@ -476,8 +476,8 @@ function requireNative() {
|
|
|
476
476
|
try {
|
|
477
477
|
const binding = require('cas-typescript-sdk-openharmony-arm64')
|
|
478
478
|
const bindingPackageVersion = require('cas-typescript-sdk-openharmony-arm64/package.json').version
|
|
479
|
-
if (bindingPackageVersion !== '1.0.
|
|
480
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
479
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
480
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
481
481
|
}
|
|
482
482
|
return binding
|
|
483
483
|
} catch (e) {
|
|
@@ -492,8 +492,8 @@ function requireNative() {
|
|
|
492
492
|
try {
|
|
493
493
|
const binding = require('cas-typescript-sdk-openharmony-x64')
|
|
494
494
|
const bindingPackageVersion = require('cas-typescript-sdk-openharmony-x64/package.json').version
|
|
495
|
-
if (bindingPackageVersion !== '1.0.
|
|
496
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
495
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
496
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
497
497
|
}
|
|
498
498
|
return binding
|
|
499
499
|
} catch (e) {
|
|
@@ -508,8 +508,8 @@ function requireNative() {
|
|
|
508
508
|
try {
|
|
509
509
|
const binding = require('cas-typescript-sdk-openharmony-arm')
|
|
510
510
|
const bindingPackageVersion = require('cas-typescript-sdk-openharmony-arm/package.json').version
|
|
511
|
-
if (bindingPackageVersion !== '1.0.
|
|
512
|
-
throw new Error(`Native binding package version mismatch, expected 1.0.
|
|
511
|
+
if (bindingPackageVersion !== '1.0.55' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
|
|
512
|
+
throw new Error(`Native binding package version mismatch, expected 1.0.55 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
|
|
513
513
|
}
|
|
514
514
|
return binding
|
|
515
515
|
} catch (e) {
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RSAWrapper.d.ts","sourceRoot":"","sources":["../../src-ts/asymmetric/RSAWrapper.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RSAWrapper.d.ts","sourceRoot":"","sources":["../../src-ts/asymmetric/RSAWrapper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAuC,MAAM,aAAa,CAAC;AAEvF,qBAAa,UAAU;IAErB;;;;OAIG;IACI,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,mBAAmB;IAOzD;;;;;OAKG;IAEH;;;;;OAKG;IACI,IAAI,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC;IAUzE;;;;;;OAMG;IACI,MAAM,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO;CAYzF"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RSAWrapper = void 0;
|
|
4
|
+
const index_1 = require("../../index");
|
|
5
|
+
class RSAWrapper {
|
|
3
6
|
/**
|
|
4
7
|
* Generates an RSA key pair based of parameter sent in 1024, 2048, and 4096 are supported.
|
|
5
8
|
* @param keySize
|
|
@@ -9,7 +12,7 @@ export class RSAWrapper {
|
|
|
9
12
|
if (keySize !== 1024 && keySize !== 2048 && keySize !== 4096) {
|
|
10
13
|
throw new Error("You must provide an appropriate key size to generate RSA keys");
|
|
11
14
|
}
|
|
12
|
-
return generateRsaKeys(keySize);
|
|
15
|
+
return (0, index_1.generateRsaKeys)(keySize);
|
|
13
16
|
}
|
|
14
17
|
/**
|
|
15
18
|
* Encrypts a plaintext byte array with a RSA public key
|
|
@@ -30,7 +33,7 @@ export class RSAWrapper {
|
|
|
30
33
|
if (!dataToSign || dataToSign.length === 0) {
|
|
31
34
|
throw new Error("You must provide an allocated hash to sign with RSA");
|
|
32
35
|
}
|
|
33
|
-
return signRsa(privateKey, dataToSign);
|
|
36
|
+
return (0, index_1.signRsa)(privateKey, dataToSign);
|
|
34
37
|
}
|
|
35
38
|
/**
|
|
36
39
|
* Verifies signed data by the corresponding private key with an RSA public key.
|
|
@@ -49,7 +52,8 @@ export class RSAWrapper {
|
|
|
49
52
|
if (!signature || signature.length === 0) {
|
|
50
53
|
throw new Error("You must provide and allocated signature to verify with RSA");
|
|
51
54
|
}
|
|
52
|
-
return verifyRsa(publicKey, hash, signature);
|
|
55
|
+
return (0, index_1.verifyRsa)(publicKey, hash, signature);
|
|
53
56
|
}
|
|
54
57
|
}
|
|
58
|
+
exports.RSAWrapper = RSAWrapper;
|
|
55
59
|
//# sourceMappingURL=RSAWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RSAWrapper.js","sourceRoot":"","sources":["../../src-ts/asymmetric/RSAWrapper.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"RSAWrapper.js","sourceRoot":"","sources":["../../src-ts/asymmetric/RSAWrapper.ts"],"names":[],"mappings":";;;AAAA,uCAAuF;AAEvF,MAAa,UAAU;IAErB;;;;OAIG;IACI,YAAY,CAAC,OAAe;QACjC,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;YAC3D,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACrF,CAAC;QACD,OAAO,IAAA,uBAAe,EAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IAED;;;;;OAKG;IAEH;;;;;OAKG;IACI,IAAI,CAAC,UAAkB,EAAE,UAAyB;QACvD,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;QACrE,CAAC;QACD,IAAI,CAAC,UAAU,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3C,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;QACzE,CAAC;QACD,OAAO,IAAA,eAAO,EAAC,UAAU,EAAE,UAAU,CAAC,CAAC;IACzC,CAAC;IAED;;;;;;OAMG;IACI,MAAM,CAAC,SAAiB,EAAE,IAAmB,EAAE,SAAwB;QAC5E,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;QACtE,CAAC;QACD,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;QAC3E,CAAC;QACD,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAC;QACjF,CAAC;QACD,OAAO,IAAA,iBAAS,EAAC,SAAS,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IAC/C,CAAC;CACF;AAxDD,gCAwDC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src-ts/asymmetric/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src-ts/asymmetric/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,CAAC"}
|
package/lib/asymmetric/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RSAWrapper = void 0;
|
|
4
|
+
const RSAWrapper_1 = require("./RSAWrapper");
|
|
5
|
+
Object.defineProperty(exports, "RSAWrapper", { enumerable: true, get: function () { return RSAWrapper_1.RSAWrapper; } });
|
|
3
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src-ts/asymmetric/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src-ts/asymmetric/index.ts"],"names":[],"mappings":";;;AAAA,6CAA0C;AAGjC,2FAHA,uBAAU,OAGA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CASRSADigitalSignatureResult } from "
|
|
2
|
-
import { IDigitalSignature } from "./digital-signature-base
|
|
1
|
+
import { CASRSADigitalSignatureResult } from "../../index";
|
|
2
|
+
import { IDigitalSignature } from "./digital-signature-base";
|
|
3
3
|
export declare class DigitalSignatureSHA512Wrapper implements IDigitalSignature {
|
|
4
4
|
/**
|
|
5
5
|
* Generates and RSA digital signature with SHA3-512
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digital-siganture-sha-512.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-siganture-sha-512.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"digital-siganture-sha-512.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-siganture-sha-512.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAwG,MAAM,aAAa,CAAC;AACjK,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,qBAAa,6BAA8B,YAAW,iBAAiB;IACnE;;;;;OAKG;IACH,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,4BAA4B;IAUrF;;;;;;OAMG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO;CAYxF"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DigitalSignatureSHA512Wrapper = void 0;
|
|
4
|
+
const index_1 = require("../../index");
|
|
5
|
+
class DigitalSignatureSHA512Wrapper {
|
|
3
6
|
/**
|
|
4
7
|
* Generates and RSA digital signature with SHA3-512
|
|
5
8
|
* @param rsa_key_size
|
|
@@ -13,7 +16,7 @@ export class DigitalSignatureSHA512Wrapper {
|
|
|
13
16
|
if (data_to_sign?.length === 0) {
|
|
14
17
|
throw new Error("Must provide allocated data to sign");
|
|
15
18
|
}
|
|
16
|
-
return sha512RsaDigitalSignature(rsa_key_size, data_to_sign);
|
|
19
|
+
return (0, index_1.sha512RsaDigitalSignature)(rsa_key_size, data_to_sign);
|
|
17
20
|
}
|
|
18
21
|
/**
|
|
19
22
|
* Verifies a digital signature created with the RSA public key.
|
|
@@ -32,7 +35,8 @@ export class DigitalSignatureSHA512Wrapper {
|
|
|
32
35
|
if (signature?.length === 0) {
|
|
33
36
|
throw new Error("Must provide an allocated signature");
|
|
34
37
|
}
|
|
35
|
-
return sha512RsaVerifyDigitalSignature(public_key, data_to_verify, signature);
|
|
38
|
+
return (0, index_1.sha512RsaVerifyDigitalSignature)(public_key, data_to_verify, signature);
|
|
36
39
|
}
|
|
37
40
|
}
|
|
41
|
+
exports.DigitalSignatureSHA512Wrapper = DigitalSignatureSHA512Wrapper;
|
|
38
42
|
//# sourceMappingURL=digital-siganture-sha-512.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digital-siganture-sha-512.js","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-siganture-sha-512.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"digital-siganture-sha-512.js","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-siganture-sha-512.ts"],"names":[],"mappings":";;;AAAA,uCAAiK;AAGjK,MAAa,6BAA6B;IACtC;;;;;OAKG;IACH,SAAS,CAAC,YAAoB,EAAE,YAAsB;QAClD,IAAI,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;YAC1E,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;QACxE,CAAC;QACD,IAAI,YAAY,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,IAAA,iCAAyB,EAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;OAMG;IACH,SAAS,CAAC,UAAkB,EAAE,cAAwB,EAAE,SAAmB;QACvE,IAAI,CAAC,UAAU,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACjD,CAAC;QACD,IAAI,cAAc,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAChE,CAAC;QACD,IAAI,SAAS,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,IAAA,uCAA+B,EAAC,UAAU,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;IAClF,CAAC;CACJ;AApCD,sEAoCC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CASRSADigitalSignatureResult } from "../../index
|
|
1
|
+
import { CASRSADigitalSignatureResult } from "../../index";
|
|
2
2
|
export interface IDigitalSignature {
|
|
3
3
|
createRsa(rsa_key_size: number, data_to_sign: Array<number>): CASRSADigitalSignatureResult;
|
|
4
4
|
verifyRSa(public_key: string, data_to_verify: Array<number>, signature: Array<number>): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digital-signature-base.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signature-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,
|
|
1
|
+
{"version":3,"file":"digital-signature-base.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signature-base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAA4C,MAAM,aAAa,CAAC;AAErG,MAAM,WAAW,iBAAiB;IAC9B,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,4BAA4B,CAAC;IAC3F,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC;CACnG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digital-signature-factory.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signature-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"digital-signature-factory.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signature-factory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAG5E,oBAAY,oBAAoB;IAC5B,MAAM,IAAI;IACV,MAAM,IAAI;CACb;AAED,qBAAa,uBAAuB;IAEhC;;;;OAIG;WACW,GAAG,CAAC,IAAI,EAAE,oBAAoB;CAS/C"}
|
|
@@ -1,24 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DigitalSignatureFactory = exports.DigitalSignatureType = void 0;
|
|
4
|
+
const digital_siganture_sha_512_1 = require("./digital-siganture-sha-512");
|
|
5
|
+
const digital_signaturte_sha_256_1 = require("./digital-signaturte-sha-256");
|
|
6
|
+
var DigitalSignatureType;
|
|
4
7
|
(function (DigitalSignatureType) {
|
|
5
8
|
DigitalSignatureType[DigitalSignatureType["SHA512"] = 1] = "SHA512";
|
|
6
9
|
DigitalSignatureType[DigitalSignatureType["SHA256"] = 2] = "SHA256";
|
|
7
|
-
})(DigitalSignatureType || (DigitalSignatureType = {}));
|
|
8
|
-
|
|
10
|
+
})(DigitalSignatureType || (exports.DigitalSignatureType = DigitalSignatureType = {}));
|
|
11
|
+
class DigitalSignatureFactory {
|
|
9
12
|
/**
|
|
10
13
|
* Get the appropriate digital signature wrapper based upon the type passed in.
|
|
11
14
|
* @param type
|
|
12
15
|
* @returns
|
|
13
16
|
*/
|
|
14
17
|
static get(type) {
|
|
15
|
-
let ds = new DigitalSignatureSHA512Wrapper();
|
|
18
|
+
let ds = new digital_siganture_sha_512_1.DigitalSignatureSHA512Wrapper();
|
|
16
19
|
switch (type) {
|
|
17
20
|
case DigitalSignatureType.SHA256:
|
|
18
|
-
ds = new DigitalSignatureSHA256Wrapper();
|
|
21
|
+
ds = new digital_signaturte_sha_256_1.DigitalSignatureSHA256Wrapper();
|
|
19
22
|
break;
|
|
20
23
|
}
|
|
21
24
|
return ds;
|
|
22
25
|
}
|
|
23
26
|
}
|
|
27
|
+
exports.DigitalSignatureFactory = DigitalSignatureFactory;
|
|
24
28
|
//# sourceMappingURL=digital-signature-factory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digital-signature-factory.js","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signature-factory.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"digital-signature-factory.js","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signature-factory.ts"],"names":[],"mappings":";;;AAAA,2EAA4E;AAC5E,6EAA6E;AAE7E,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC5B,mEAAU,CAAA;IACV,mEAAU,CAAA;AACd,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B;AAED,MAAa,uBAAuB;IAEhC;;;;OAIG;IACI,MAAM,CAAC,GAAG,CAAC,IAA0B;QACxC,IAAI,EAAE,GAAG,IAAI,yDAA6B,EAAE,CAAC;QAC7C,QAAQ,IAAI,EAAE,CAAC;YACX,KAAK,oBAAoB,CAAC,MAAM;gBAC5B,EAAE,GAAG,IAAI,0DAA6B,EAAE,CAAC;gBACzC,MAAM;QACd,CAAC;QACD,OAAO,EAAE,CAAC;IACd,CAAC;CACJ;AAhBD,0DAgBC"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { CASRSADigitalSignatureResult } from "
|
|
2
|
-
import { IDigitalSignature } from "./digital-signature-base
|
|
1
|
+
import { CASRSADigitalSignatureResult } from "../../index";
|
|
2
|
+
import { IDigitalSignature } from "./digital-signature-base";
|
|
3
3
|
export declare class DigitalSignatureSHA256Wrapper implements IDigitalSignature {
|
|
4
4
|
/**
|
|
5
|
-
* Generates and RSA digital signature with SHA3-
|
|
5
|
+
* Generates and RSA digital signature with SHA3-512
|
|
6
6
|
* @param rsa_key_size
|
|
7
7
|
* @param data_to_sign
|
|
8
|
-
* @returns
|
|
8
|
+
* @returns RsaDigitalSignatureResult
|
|
9
9
|
*/
|
|
10
10
|
createRsa(rsa_key_size: number, data_to_sign: number[]): CASRSADigitalSignatureResult;
|
|
11
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digital-signaturte-sha-256.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signaturte-sha-256.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"digital-signaturte-sha-256.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signaturte-sha-256.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAA8D,MAAM,aAAa,CAAC;AACvH,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,qBAAa,6BAA8B,YAAW,iBAAiB;IAEnE;;;;;OAKG;IACH,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,4BAA4B;IAUrF;;;;;;OAMG;IACH,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO;CAYxF"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DigitalSignatureSHA256Wrapper = void 0;
|
|
4
|
+
const index_1 = require("../../index");
|
|
5
|
+
class DigitalSignatureSHA256Wrapper {
|
|
3
6
|
/**
|
|
4
|
-
* Generates and RSA digital signature with SHA3-
|
|
7
|
+
* Generates and RSA digital signature with SHA3-512
|
|
5
8
|
* @param rsa_key_size
|
|
6
9
|
* @param data_to_sign
|
|
7
|
-
* @returns
|
|
10
|
+
* @returns RsaDigitalSignatureResult
|
|
8
11
|
*/
|
|
9
12
|
createRsa(rsa_key_size, data_to_sign) {
|
|
10
13
|
if (rsa_key_size !== 1024 && rsa_key_size !== 2048 && rsa_key_size !== 4096) {
|
|
@@ -13,7 +16,7 @@ export class DigitalSignatureSHA256Wrapper {
|
|
|
13
16
|
if (data_to_sign?.length === 0) {
|
|
14
17
|
throw new Error("Must provide allocated data to sign");
|
|
15
18
|
}
|
|
16
|
-
return sha256RsaDigitalSignature(rsa_key_size, data_to_sign);
|
|
19
|
+
return (0, index_1.sha256RsaDigitalSignature)(rsa_key_size, data_to_sign);
|
|
17
20
|
}
|
|
18
21
|
/**
|
|
19
22
|
* Verifies a digital signature created with the RSA public key.
|
|
@@ -32,7 +35,8 @@ export class DigitalSignatureSHA256Wrapper {
|
|
|
32
35
|
if (signature?.length === 0) {
|
|
33
36
|
throw new Error("Must provide an allocated signature");
|
|
34
37
|
}
|
|
35
|
-
return sha256RsaVerifyDigitalSignature(public_key, data_to_verify, signature);
|
|
38
|
+
return (0, index_1.sha256RsaVerifyDigitalSignature)(public_key, data_to_verify, signature);
|
|
36
39
|
}
|
|
37
40
|
}
|
|
41
|
+
exports.DigitalSignatureSHA256Wrapper = DigitalSignatureSHA256Wrapper;
|
|
38
42
|
//# sourceMappingURL=digital-signaturte-sha-256.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"digital-signaturte-sha-256.js","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signaturte-sha-256.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"digital-signaturte-sha-256.js","sourceRoot":"","sources":["../../src-ts/digital-signature/digital-signaturte-sha-256.ts"],"names":[],"mappings":";;;AAAA,uCAAuH;AAGvH,MAAa,6BAA6B;IAEtC;;;;;OAKG;IACH,SAAS,CAAC,YAAoB,EAAE,YAAsB;QAClD,IAAI,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,IAAI,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;YAC1E,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;QACxE,CAAC;QACD,IAAI,YAAY,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC;YAC7B,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,IAAA,iCAAyB,EAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;OAMG;IACH,SAAS,CAAC,UAAkB,EAAE,cAAwB,EAAE,SAAmB;QACvE,IAAI,CAAC,UAAU,EAAE,CAAC;YACd,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;QACjD,CAAC;QACD,IAAI,cAAc,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAChE,CAAC;QACD,IAAI,SAAS,EAAE,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;QAC3D,CAAC;QACD,OAAO,IAAA,uCAA+B,EAAC,UAAU,EAAE,cAAc,EAAE,SAAS,CAAC,CAAC;IAClF,CAAC;CACJ;AArCD,sEAqCC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DigitalSignatureType } from "./digital-signature-factory
|
|
2
|
-
import { DigitalSignatureFactory } from "./digital-signature-factory
|
|
3
|
-
import { DigitalSignatureSHA256Wrapper } from "./digital-signaturte-sha-256
|
|
4
|
-
import { DigitalSignatureSHA512Wrapper } from "./digital-siganture-sha-512
|
|
5
|
-
import { CASRSADigitalSignatureResult, CASSHAED25519DalekDigitalSignatureResult } from "
|
|
1
|
+
import { DigitalSignatureType } from "./digital-signature-factory";
|
|
2
|
+
import { DigitalSignatureFactory } from "./digital-signature-factory";
|
|
3
|
+
import { DigitalSignatureSHA256Wrapper } from "./digital-signaturte-sha-256";
|
|
4
|
+
import { DigitalSignatureSHA512Wrapper } from "./digital-siganture-sha-512";
|
|
5
|
+
import { CASRSADigitalSignatureResult, CASSHAED25519DalekDigitalSignatureResult } from "../../index";
|
|
6
6
|
export { DigitalSignatureFactory, DigitalSignatureSHA256Wrapper, DigitalSignatureSHA512Wrapper, DigitalSignatureType, CASSHAED25519DalekDigitalSignatureResult, CASRSADigitalSignatureResult };
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src-ts/digital-signature/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,4BAA4B,EAAE,wCAAwC,EAAE,MAAM,aAAa,CAAC;AAErG,OAAO,EACL,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,oBAAoB,EACpB,wCAAwC,EACxC,4BAA4B,EAC7B,CAAC"}
|