xypriss-security 2.1.5 → 2.1.7

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.
@@ -18,8 +18,10 @@ export * from "./bridge";
18
18
  export { XyPrissSecurity as XSec } from "./XyPrissSecurity";
19
19
  export { PasswordManager as pm } from "./PasswordManager";
20
20
  import { Hash } from "./Hash";
21
+ import { Keys } from "./keys";
21
22
  import { Random } from "./Random";
22
23
  import { XyPrissSecurity } from "./XyPrissSecurity";
24
+ type cryptoKeysType = typeof Random & typeof Keys;
23
25
  /**
24
26
  * ### Cipher Class (Compatibility)
25
27
  *
@@ -32,7 +34,7 @@ export declare class Cipher {
32
34
  /** Cryptographically secure random number and token generation. */
33
35
  static readonly random: typeof Random;
34
36
  /** Alias for random module. */
35
- static readonly crypto: typeof Random;
37
+ static readonly crypto: cryptoKeysType;
36
38
  /** Framework-level security management and configuration. */
37
39
  static readonly XSec: typeof XyPrissSecurity;
38
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;8EAQ8E;AAE9E,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAE,eAAe,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,eAAe,IAAI,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAE1D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;;GAKG;AACH,qBAAa,MAAM;IACjB,oDAAoD;IACpD,gBAAuB,IAAI,cAAQ;IACnC,mEAAmE;IACnE,gBAAuB,MAAM,gBAAU;IACvC,+BAA+B;IAC/B,gBAAuB,MAAM,gBAAU;IACvC,6DAA6D;IAC7D,gBAAuB,IAAI,yBAAmB;CAC/C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;8EAQ8E;AAE9E,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAE,eAAe,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,eAAe,IAAI,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAG1D,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,KAAK,cAAc,GAAG,OAAO,MAAM,GAAG,OAAO,IAAI,CAAC;AAElD;;;;;GAKG;AACH,qBAAa,MAAM;IACjB,oDAAoD;IACpD,gBAAuB,IAAI,cAAQ;IACnC,mEAAmE;IACnE,gBAAuB,MAAM,gBAAU;IACvC,+BAA+B;IAC/B,gBAAuB,MAAM,EAAE,cAAc,CAA6B;IAC1E,6DAA6D;IAC7D,gBAAuB,IAAI,yBAAmB;CAC/C"}
@@ -36,7 +36,9 @@ var XyPrissSecurity_1 = require("./XyPrissSecurity"); // Alias for XyPrissSecuri
36
36
  Object.defineProperty(exports, "XSec", { enumerable: true, get: function () { return XyPrissSecurity_1.XyPrissSecurity; } });
37
37
  var PasswordManager_1 = require("./PasswordManager"); // Alias for PasswordManager
38
38
  Object.defineProperty(exports, "pm", { enumerable: true, get: function () { return PasswordManager_1.PasswordManager; } });
39
+ const mergeStatic_1 = require("../utils/mergeStatic");
39
40
  const Hash_1 = require("./Hash");
41
+ const keys_1 = require("./keys");
40
42
  const Random_1 = require("./Random");
41
43
  const XyPrissSecurity_2 = require("./XyPrissSecurity");
42
44
  /**
@@ -53,7 +55,7 @@ Cipher.hash = Hash_1.Hash;
53
55
  /** Cryptographically secure random number and token generation. */
54
56
  Cipher.random = Random_1.Random;
55
57
  /** Alias for random module. */
56
- Cipher.crypto = Random_1.Random;
58
+ Cipher.crypto = (0, mergeStatic_1.mergeStatic)(Random_1.Random, keys_1.Keys);
57
59
  /** Framework-level security management and configuration. */
58
60
  Cipher.XSec = XyPrissSecurity_2.XyPrissSecurity;
59
61
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;8EAQ8E;;;;;;;;;;;;;;;;;AAE9E,yCAAuB;AACvB,2CAAyB;AACzB,6CAA2B;AAC3B,oDAAkC;AAClC,oDAAkC;AAClC,iDAA+B;AAC/B,yCAAuB;AACvB,2CAAyB;AAEzB,qDAA4D,CAAC,4BAA4B;AAAhF,uGAAA,eAAe,OAAQ;AAChC,qDAA0D,CAAC,4BAA4B;AAA9E,qGAAA,eAAe,OAAM;AAE9B,iCAA8B;AAC9B,qCAAkC;AAClC,uDAAoD;AAEpD;;;;;GAKG;AACH,MAAa,MAAM;;AAAnB,wBASC;AARC,oDAAoD;AAC7B,WAAI,GAAG,WAAI,CAAC;AACnC,mEAAmE;AAC5C,aAAM,GAAG,eAAM,CAAC;AACvC,+BAA+B;AACR,aAAM,GAAG,eAAM,CAAC;AACvC,6DAA6D;AACtC,WAAI,GAAG,iCAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;8EAQ8E;;;;;;;;;;;;;;;;;AAE9E,yCAAuB;AACvB,2CAAyB;AACzB,6CAA2B;AAC3B,oDAAkC;AAClC,oDAAkC;AAClC,iDAA+B;AAC/B,yCAAuB;AACvB,2CAAyB;AAEzB,qDAA4D,CAAC,4BAA4B;AAAhF,uGAAA,eAAe,OAAQ;AAChC,qDAA0D,CAAC,4BAA4B;AAA9E,qGAAA,eAAe,OAAM;AAE9B,sDAAmD;AACnD,iCAA8B;AAC9B,iCAA8B;AAC9B,qCAAkC;AAClC,uDAAoD;AAIpD;;;;;GAKG;AACH,MAAa,MAAM;;AAAnB,wBASC;AARC,oDAAoD;AAC7B,WAAI,GAAG,WAAI,CAAC;AACnC,mEAAmE;AAC5C,aAAM,GAAG,eAAM,CAAC;AACvC,+BAA+B;AACR,aAAM,GAAmB,IAAA,yBAAW,EAAC,eAAM,EAAE,WAAI,CAAC,CAAC;AAC1E,6DAA6D;AACtC,WAAI,GAAG,iCAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function mergeStatic<A extends object, B extends object>(a: A, b: B): A & B;
2
+ //# sourceMappingURL=mergeStatic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeStatic.d.ts","sourceRoot":"","sources":["../../../src/utils/mergeStatic.ts"],"names":[],"mappings":"AAAA,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAuBjF"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.mergeStatic = mergeStatic;
4
+ function mergeStatic(a, b) {
5
+ const result = Object.create(null);
6
+ const skip = new Set(["prototype", "length", "name"]);
7
+ function copyFrom(src, bindTarget) {
8
+ let current = src;
9
+ while (current && current !== Function.prototype) {
10
+ for (const key of Object.getOwnPropertyNames(current)) {
11
+ if (skip.has(key) || key in result)
12
+ continue; // A a priorité sur B
13
+ const desc = Object.getOwnPropertyDescriptor(current, key);
14
+ if (typeof desc.value === "function") {
15
+ desc.value = desc.value.bind(bindTarget);
16
+ }
17
+ Object.defineProperty(result, key, desc);
18
+ }
19
+ current = Object.getPrototypeOf(current);
20
+ }
21
+ }
22
+ copyFrom(b, b); // B en premier
23
+ copyFrom(a, a); // A écrase B en cas de conflit
24
+ return result;
25
+ }
26
+ //# sourceMappingURL=mergeStatic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeStatic.js","sourceRoot":"","sources":["../../../src/utils/mergeStatic.ts"],"names":[],"mappings":";;AAAA,kCAuBC;AAvBD,SAAgB,WAAW,CAAqC,CAAI,EAAE,CAAI;IACxE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IAEtD,SAAS,QAAQ,CAAC,GAAQ,EAAE,UAAe;QACzC,IAAI,OAAO,GAAG,GAAG,CAAC;QAClB,OAAO,OAAO,IAAI,OAAO,KAAK,QAAQ,CAAC,SAAS,EAAE,CAAC;YACjD,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,mBAAmB,CAAC,OAAO,CAAC,EAAE,CAAC;gBACtD,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,GAAG,IAAI,MAAM;oBAAE,SAAS,CAAC,qBAAqB;gBACnE,MAAM,IAAI,GAAG,MAAM,CAAC,wBAAwB,CAAC,OAAO,EAAE,GAAG,CAAE,CAAC;gBAC5D,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,UAAU,EAAE,CAAC;oBACrC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;gBAC3C,CAAC;gBACD,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;YAC3C,CAAC;YACD,OAAO,GAAG,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QAC3C,CAAC;IACH,CAAC;IAED,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,eAAe;IAC/B,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,+BAA+B;IAE/C,OAAO,MAAe,CAAC;AACzB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xypriss-security",
3
- "version": "2.1.5",
3
+ "version": "2.1.7",
4
4
  "description": "Advanced High-Performance Security Framework powered by a Go Core. Military-grade encryption, post-quantum resilience, and fortified data structures.",
5
5
  "author": {
6
6
  "name": "NEHONIX",