@keeper-security/keeperapi 16.0.1 → 16.0.4
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/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/07113f92cc3a9f5dc57b92f54542a63463f1fa9a +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/1ba6467ba06d4bfc0c8581f4ee12c2c0f687214e +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/1de1e40928c5c58c4f677d93986cdff01b3d0417 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/47382883a57ad5790d3fd6abd39f33f773726b3b +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/4939a895ecf4daac58b0d73bccd49876515d41b8 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/592d89407340c5ec6ad006df327e588b3f442eca +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/59783c8cc0cc9d984f5407c218d213bca4c98503 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/61fa6cf725249a1cae9b94b74a8c23aa3efd2ca1 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/77aced5528ce05fe900fdf7634042ec3c0f18255 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/b32ea8d6d3de0c6d8e178eff069fea4e11fa92b1 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/c05be8364ff56aba0298689783666ddb97a31285 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/e23bf49223ba8b7ec926e46c40b27b0353cfc50e +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/eec92c105b2694c31bff21903ddc3ef81af8f056 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/07113f92cc3a9f5dc57b92f54542a63463f1fa9a +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/1ba6467ba06d4bfc0c8581f4ee12c2c0f687214e +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/1de1e40928c5c58c4f677d93986cdff01b3d0417 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/47382883a57ad5790d3fd6abd39f33f773726b3b +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/4939a895ecf4daac58b0d73bccd49876515d41b8 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/592d89407340c5ec6ad006df327e588b3f442eca +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/59783c8cc0cc9d984f5407c218d213bca4c98503 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/61fa6cf725249a1cae9b94b74a8c23aa3efd2ca1 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/77aced5528ce05fe900fdf7634042ec3c0f18255 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/b32ea8d6d3de0c6d8e178eff069fea4e11fa92b1 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/c05be8364ff56aba0298689783666ddb97a31285 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/e23bf49223ba8b7ec926e46c40b27b0353cfc50e +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/eec92c105b2694c31bff21903ddc3ef81af8f056 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/07113f92cc3a9f5dc57b92f54542a63463f1fa9a +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/1ba6467ba06d4bfc0c8581f4ee12c2c0f687214e +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/1de1e40928c5c58c4f677d93986cdff01b3d0417 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/47382883a57ad5790d3fd6abd39f33f773726b3b +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/4939a895ecf4daac58b0d73bccd49876515d41b8 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/592d89407340c5ec6ad006df327e588b3f442eca +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/59783c8cc0cc9d984f5407c218d213bca4c98503 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/61fa6cf725249a1cae9b94b74a8c23aa3efd2ca1 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/77aced5528ce05fe900fdf7634042ec3c0f18255 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/b32ea8d6d3de0c6d8e178eff069fea4e11fa92b1 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/c05be8364ff56aba0298689783666ddb97a31285 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/e23bf49223ba8b7ec926e46c40b27b0353cfc50e +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/eec92c105b2694c31bff21903ddc3ef81af8f056 +1 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/20b49cde4def23063b280689e4ff4d5a3803712b +0 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/3809196a67de680945038f2b4846e2e3b4af35aa +0 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/4ad5d47b1ce7bf45cc7d9ff8c970e1fc57f446f3 +0 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/5a0816a3c916ff0e4961dc0ec2da48646f2ac5aa +0 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/6182f5491d41e8f10acfbcf46ee875587904f5a3 +0 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/7ca2e31bcece668dfa5de5e1349ba34a757b5140 +0 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/86a4b0102f5568ac0a5b946d05c55f42c30b472d +0 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/87fae47dd5b05377c04cfe377699d748414dc1c9 +0 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/a7c23ecebcaf23c9346007731c5796b96c580738 +0 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/ac4d101c3489192db3e0ec98430a2336cba9a741 +0 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/b1eb441c5b806d06ba6bb36fcfd0cc4746c23a8a +0 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/b7942903000069a51e317fef1595a8ea1d8b828d +0 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/cee91236390168fd38b01aaae7bed3099bb4555a +0 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/d7c87ce194d923e6f02c7e570008e88ade1cbabf +0 -0
- package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/fba70878178c036fb4e9e1f19bdb465a1270d258 +0 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/05d17f791979143cbce20e3e3e811aa19ed8b492 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/07113f92cc3a9f5dc57b92f54542a63463f1fa9a +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/1ba6467ba06d4bfc0c8581f4ee12c2c0f687214e +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/1de1e40928c5c58c4f677d93986cdff01b3d0417 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/47382883a57ad5790d3fd6abd39f33f773726b3b +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/4d58c1113d07816b1909aaef4395fd8b4d0ee13c +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/4ee978699d6de2a60214b16c42d87f8e9309636b +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/50f4a014d14ada987c125e6ea55d4e6e75605313 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/58aa8c228c99b690d3ca1f3b464585c41d1cd4bb +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/592d89407340c5ec6ad006df327e588b3f442eca +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/59783c8cc0cc9d984f5407c218d213bca4c98503 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/61fa6cf725249a1cae9b94b74a8c23aa3efd2ca1 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/89f8a81d9d078b69f9fa7fa95251b38ccc394a3b +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/b32ea8d6d3de0c6d8e178eff069fea4e11fa92b1 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/c05be8364ff56aba0298689783666ddb97a31285 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/e23bf49223ba8b7ec926e46c40b27b0353cfc50e +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/eec92c105b2694c31bff21903ddc3ef81af8f056 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/05d17f791979143cbce20e3e3e811aa19ed8b492 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/07113f92cc3a9f5dc57b92f54542a63463f1fa9a +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/1ba6467ba06d4bfc0c8581f4ee12c2c0f687214e +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/1de1e40928c5c58c4f677d93986cdff01b3d0417 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/47382883a57ad5790d3fd6abd39f33f773726b3b +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/4d58c1113d07816b1909aaef4395fd8b4d0ee13c +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/4ee978699d6de2a60214b16c42d87f8e9309636b +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/50f4a014d14ada987c125e6ea55d4e6e75605313 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/58aa8c228c99b690d3ca1f3b464585c41d1cd4bb +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/592d89407340c5ec6ad006df327e588b3f442eca +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/59783c8cc0cc9d984f5407c218d213bca4c98503 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/61fa6cf725249a1cae9b94b74a8c23aa3efd2ca1 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/89f8a81d9d078b69f9fa7fa95251b38ccc394a3b +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/b32ea8d6d3de0c6d8e178eff069fea4e11fa92b1 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/c05be8364ff56aba0298689783666ddb97a31285 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/e23bf49223ba8b7ec926e46c40b27b0353cfc50e +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/eec92c105b2694c31bff21903ddc3ef81af8f056 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/05d17f791979143cbce20e3e3e811aa19ed8b492 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/07113f92cc3a9f5dc57b92f54542a63463f1fa9a +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/1ba6467ba06d4bfc0c8581f4ee12c2c0f687214e +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/1de1e40928c5c58c4f677d93986cdff01b3d0417 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/47382883a57ad5790d3fd6abd39f33f773726b3b +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/4d58c1113d07816b1909aaef4395fd8b4d0ee13c +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/4ee978699d6de2a60214b16c42d87f8e9309636b +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/50f4a014d14ada987c125e6ea55d4e6e75605313 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/58aa8c228c99b690d3ca1f3b464585c41d1cd4bb +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/592d89407340c5ec6ad006df327e588b3f442eca +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/59783c8cc0cc9d984f5407c218d213bca4c98503 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/61fa6cf725249a1cae9b94b74a8c23aa3efd2ca1 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/89f8a81d9d078b69f9fa7fa95251b38ccc394a3b +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/b32ea8d6d3de0c6d8e178eff069fea4e11fa92b1 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/c05be8364ff56aba0298689783666ddb97a31285 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/e23bf49223ba8b7ec926e46c40b27b0353cfc50e +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/eec92c105b2694c31bff21903ddc3ef81af8f056 +1 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/20b49cde4def23063b280689e4ff4d5a3803712b +0 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/3809196a67de680945038f2b4846e2e3b4af35aa +0 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/4ad5d47b1ce7bf45cc7d9ff8c970e1fc57f446f3 +0 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/5a0816a3c916ff0e4961dc0ec2da48646f2ac5aa +0 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/6182f5491d41e8f10acfbcf46ee875587904f5a3 +0 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/7ca2e31bcece668dfa5de5e1349ba34a757b5140 +0 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/86a4b0102f5568ac0a5b946d05c55f42c30b472d +0 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/87fae47dd5b05377c04cfe377699d748414dc1c9 +0 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/a7c23ecebcaf23c9346007731c5796b96c580738 +0 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/ac4d101c3489192db3e0ec98430a2336cba9a741 +0 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/b1eb441c5b806d06ba6bb36fcfd0cc4746c23a8a +0 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/b7942903000069a51e317fef1595a8ea1d8b828d +0 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/cee91236390168fd38b01aaae7bed3099bb4555a +0 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/d7c87ce194d923e6f02c7e570008e88ade1cbabf +0 -0
- package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/fba70878178c036fb4e9e1f19bdb465a1270d258 +0 -0
- package/babel.config.js +6 -0
- package/package.json +7 -10
- package/rollup.config.js +50 -0
- package/scripts/cleanDistFolder.js +9 -0
- package/src/__tests__/utils.test.js +13 -0
- package/src/auth.ts +1514 -0
- package/src/browser/asn1hex.ts +296 -0
- package/src/browser/index.ts +17 -0
- package/src/browser/jsbn.ts +1213 -0
- package/src/browser/platform.ts +434 -0
- package/src/browser/rng.ts +15 -0
- package/src/browser/rsa.ts +262 -0
- package/src/commands.ts +1378 -0
- package/src/company.ts +244 -0
- package/src/configuration.ts +125 -0
- package/src/endpoint.ts +350 -0
- package/src/node/index.ts +17 -0
- package/src/node/platform.ts +283 -0
- package/src/platform.ts +76 -0
- package/{dist → src}/proto.d.ts +0 -0
- package/src/proto.js +136564 -0
- package/src/restMessages.ts +311 -0
- package/src/utils.ts +169 -0
- package/src/vault.ts +844 -0
- package/src/vendorContext.ts +69 -0
- package/src/vendorModel.ts +36 -0
- package/tsconfig.json +14 -0
- package/tsconfig.rollup.json +14 -0
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
import {BigInteger, parseBigInt} from "./jsbn";
|
|
2
|
+
import {SecureRandom} from "./rng";
|
|
3
|
+
import {_rsapem_getHexValueArrayOfChildrenFromHex} from './asn1hex';
|
|
4
|
+
// Depends on jsbn.js and rng.js
|
|
5
|
+
|
|
6
|
+
// Version 1.1: support utf-8 encoding in pkcs1pad2
|
|
7
|
+
|
|
8
|
+
function linebrk(s,n) {
|
|
9
|
+
var ret = "";
|
|
10
|
+
var i = 0;
|
|
11
|
+
while(i + n < s.length) {
|
|
12
|
+
ret += s.substring(i,i+n) + "\n";
|
|
13
|
+
i += n;
|
|
14
|
+
}
|
|
15
|
+
return ret + s.substring(i,s.length);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function byte2Hex(b) {
|
|
19
|
+
if(b < 0x10)
|
|
20
|
+
return "0" + b.toString(16);
|
|
21
|
+
else
|
|
22
|
+
return b.toString(16);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// PKCS#1 (type 2, random) pad input string s to n bytes, and return a bigint
|
|
26
|
+
function pkcs1pad2(s,n) {
|
|
27
|
+
if(n < s.length + 11) { // TODO: fix for utf-8
|
|
28
|
+
alert("Message too long for RSA");
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
var ba = new Array();
|
|
32
|
+
var i = s.length - 1;
|
|
33
|
+
while(i >= 0 && n > 0) {
|
|
34
|
+
var c = s.charCodeAt(i--);
|
|
35
|
+
if(c < 128) { // encode using utf-8
|
|
36
|
+
ba[--n] = c;
|
|
37
|
+
}
|
|
38
|
+
else if((c > 127) && (c < 2048)) {
|
|
39
|
+
ba[--n] = (c & 63) | 128;
|
|
40
|
+
ba[--n] = (c >> 6) | 192;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
ba[--n] = (c & 63) | 128;
|
|
44
|
+
ba[--n] = ((c >> 6) & 63) | 128;
|
|
45
|
+
ba[--n] = (c >> 12) | 224;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
ba[--n] = 0;
|
|
49
|
+
var rng = new SecureRandom();
|
|
50
|
+
var x = new Array();
|
|
51
|
+
while(n > 2) { // random non-zero pad
|
|
52
|
+
x[0] = 0;
|
|
53
|
+
while(x[0] == 0) rng.nextBytes(x);
|
|
54
|
+
ba[--n] = x[0];
|
|
55
|
+
}
|
|
56
|
+
ba[--n] = 2;
|
|
57
|
+
ba[--n] = 0;
|
|
58
|
+
return new BigInteger(ba);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// "empty" RSA key constructor
|
|
62
|
+
export function RSAKey() {
|
|
63
|
+
this.n = null;
|
|
64
|
+
this.e = 0;
|
|
65
|
+
this.d = null;
|
|
66
|
+
this.p = null;
|
|
67
|
+
this.q = null;
|
|
68
|
+
this.dmp1 = null;
|
|
69
|
+
this.dmq1 = null;
|
|
70
|
+
this.coeff = null;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// Set the public key fields N and e from hex strings
|
|
74
|
+
function RSASetPublic(N,E) {
|
|
75
|
+
if(N != null && E != null && N.length > 0 && E.length > 0) {
|
|
76
|
+
this.n = parseBigInt(N,16);
|
|
77
|
+
this.e = parseInt(E,16);
|
|
78
|
+
}
|
|
79
|
+
else
|
|
80
|
+
alert("Invalid RSA public key");
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Perform raw public operation on "x": return x^e (mod n)
|
|
84
|
+
function RSADoPublic(x) {
|
|
85
|
+
return x.modPowInt(this.e, this.n);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function RSADoPrivate(x) {
|
|
89
|
+
if(this.p == null || this.q == null)
|
|
90
|
+
return x.modPow(this.d, this.n);
|
|
91
|
+
|
|
92
|
+
// TODO: re-calculate any missing CRT params
|
|
93
|
+
var xp = x.mod(this.p).modPow(this.dmp1, this.p);
|
|
94
|
+
var xq = x.mod(this.q).modPow(this.dmq1, this.q);
|
|
95
|
+
|
|
96
|
+
while(xp.compareTo(xq) < 0)
|
|
97
|
+
xp = xp.add(this.p);
|
|
98
|
+
return xp.subtract(xq).multiply(this.coeff).mod(this.p).multiply(this.q).add(xq);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Return the PKCS#1 RSA encryption of "text" as an even-length hex string
|
|
102
|
+
function RSAEncrypt(text) {
|
|
103
|
+
var m = pkcs1pad2(text,(this.n.bitLength()+7)>>3);
|
|
104
|
+
if(m == null) return null;
|
|
105
|
+
var c = this.doPublic(m);
|
|
106
|
+
if(c == null) return null;
|
|
107
|
+
var h = c.toString(16);
|
|
108
|
+
if((h.length & 1) == 0) return h; else return "0" + h;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Return the PKCS#1 RSA encryption of "text" as a Base64-encoded string
|
|
112
|
+
//function RSAEncryptB64(text) {
|
|
113
|
+
// var h = this.encrypt(text);
|
|
114
|
+
// if(h) return hex2b64(h); else return null;
|
|
115
|
+
//}
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
// Binary safe pkcs1 type 2 padding
|
|
119
|
+
function pkcs1pad2hex(hexPlaintext,n) {
|
|
120
|
+
if(n < hexPlaintext.length/2 + 11) {
|
|
121
|
+
alert("Message too long for RSA");
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
var ba = new Array();
|
|
125
|
+
var i = hexPlaintext.length;
|
|
126
|
+
while(i >= 2 && n > 0) {
|
|
127
|
+
ba[--n] = parseInt(hexPlaintext.slice(i-2, i), 16);
|
|
128
|
+
i -= 2;
|
|
129
|
+
}
|
|
130
|
+
ba[--n] = 0;
|
|
131
|
+
var rng = new SecureRandom();
|
|
132
|
+
var x = new Array();
|
|
133
|
+
while(n > 2) { // random non-zero pad
|
|
134
|
+
x[0] = 0;
|
|
135
|
+
while(x[0] == 0) rng.nextBytes(x);
|
|
136
|
+
ba[--n] = x[0];
|
|
137
|
+
}
|
|
138
|
+
ba[--n] = 2;
|
|
139
|
+
ba[--n] = 0;
|
|
140
|
+
return new BigInteger(ba);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
//Binary safe pkcs1 type 2 un-padding
|
|
144
|
+
function pkcs1unpad2hex(d,n) {
|
|
145
|
+
var b = d.toByteArray();
|
|
146
|
+
var i = 0;
|
|
147
|
+
while(i < b.length && b[i] == 0) ++i;
|
|
148
|
+
if(b.length-i != n-1 || b[i] != 2)
|
|
149
|
+
return null;
|
|
150
|
+
++i;
|
|
151
|
+
while(b[i] != 0)
|
|
152
|
+
if(++i >= b.length) return null;
|
|
153
|
+
var ret = "";
|
|
154
|
+
while(++i < b.length) {
|
|
155
|
+
var c = b[i] & 255;
|
|
156
|
+
ret += (c < 16) ? '0' + c.toString(16) : c.toString(16);
|
|
157
|
+
}
|
|
158
|
+
return ret;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Generates a ASN.1 Hex string.
|
|
163
|
+
* @param {boolean} include_private Set to true to include the private bits as well.
|
|
164
|
+
* @returns
|
|
165
|
+
*/
|
|
166
|
+
function RSAtoASN1Hex (include_private) {
|
|
167
|
+
var v = asn('00');
|
|
168
|
+
var n = asn(this.n.toString(16));
|
|
169
|
+
var e = asn(this.e.toString(16));
|
|
170
|
+
var d = asn(this.d.toString(16));
|
|
171
|
+
var p = asn(this.p.toString(16));
|
|
172
|
+
var q = asn(this.q.toString(16));
|
|
173
|
+
var dmp1 = asn(this.dmp1.toString(16));
|
|
174
|
+
var dmq1 = asn(this.dmq1.toString(16));
|
|
175
|
+
var coeff = asn(this.coeff.toString(16));
|
|
176
|
+
|
|
177
|
+
if (typeof include_private !== 'undefined' && include_private)
|
|
178
|
+
return asn(v + n + e + d + p + q + dmp1 + dmq1 + coeff, '30');
|
|
179
|
+
else
|
|
180
|
+
return asn(n + e, '30');
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
function asn (data?, type?) {
|
|
184
|
+
if (typeof type === 'undefined') type = '02';
|
|
185
|
+
|
|
186
|
+
// Pad the data with a leading '0' if necessary
|
|
187
|
+
data = (data.length % 2 === 0) ? data : '0' + data;
|
|
188
|
+
|
|
189
|
+
// Pad the data again with a '00' to ensure its positive. Some parser
|
|
190
|
+
// stupid implementations will freak out on negative RSA bits.
|
|
191
|
+
if (parseInt(data.substr(0,2), 16) > 127)
|
|
192
|
+
data = '00' + data;
|
|
193
|
+
|
|
194
|
+
return type + asn_length(data) + data;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function asn_length (item) {
|
|
198
|
+
var length = item.length / 2; // We're dealing with hex here
|
|
199
|
+
var length_hex = (length.toString(16).length % 2 === 0) ? length.toString(16) : '0' + length.toString(16);
|
|
200
|
+
|
|
201
|
+
if (length < 128) {
|
|
202
|
+
return length_hex;
|
|
203
|
+
} else {
|
|
204
|
+
var length_length = 128 + length_hex.length / 2;
|
|
205
|
+
var length_length_hex = (length_length.toString(16).length % 2 === 0) ? length_length.toString(16) : '0' + length_length.toString(16);
|
|
206
|
+
|
|
207
|
+
return length_length_hex + length_hex;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
function RSAEncryptBinary(hex) {
|
|
213
|
+
var m = pkcs1pad2hex(hex,(this.n.bitLength()+7)>>3);
|
|
214
|
+
if(m == null) return null;
|
|
215
|
+
var c = this.doPublic(m);
|
|
216
|
+
if(c == null) return null;
|
|
217
|
+
var h = c.toString(16);
|
|
218
|
+
if((h.length & 1) == 0) return h; else return "0" + h;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function RSADecryptBinary(ctext) {
|
|
222
|
+
var c = parseBigInt(ctext, 16);
|
|
223
|
+
var m = this.doPrivate(c);
|
|
224
|
+
if(m == null) return null;
|
|
225
|
+
return pkcs1unpad2hex(m, (this.n.bitLength()+7)>>3);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function RSASetPrivateEx(N,E,D,P,Q,DP,DQ,C) {
|
|
229
|
+
if(N != null && E != null && N.length > 0 && E.length > 0) {
|
|
230
|
+
this.n = parseBigInt(N,16);
|
|
231
|
+
this.e = parseInt(E,16);
|
|
232
|
+
this.d = parseBigInt(D,16);
|
|
233
|
+
this.p = parseBigInt(P,16);
|
|
234
|
+
this.q = parseBigInt(Q,16);
|
|
235
|
+
this.dmp1 = parseBigInt(DP,16);
|
|
236
|
+
this.dmq1 = parseBigInt(DQ,16);
|
|
237
|
+
this.coeff = parseBigInt(C,16);
|
|
238
|
+
}
|
|
239
|
+
else
|
|
240
|
+
alert("Invalid RSA private key");
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
function RSASetPrivateKeyFromASN1HexString(keyHex) {
|
|
244
|
+
const a = _rsapem_getHexValueArrayOfChildrenFromHex(keyHex);
|
|
245
|
+
this.setPrivateEx(a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// protected
|
|
249
|
+
RSAKey.prototype.doPublic = RSADoPublic;
|
|
250
|
+
RSAKey.prototype.doPrivate = RSADoPrivate;
|
|
251
|
+
|
|
252
|
+
// public
|
|
253
|
+
RSAKey.prototype.setPublic = RSASetPublic;
|
|
254
|
+
RSAKey.prototype.encrypt = RSAEncrypt;
|
|
255
|
+
//RSAKey.prototype.encrypt_b64 = RSAEncryptB64;
|
|
256
|
+
|
|
257
|
+
RSAKey.prototype.encryptBinary = RSAEncryptBinary;
|
|
258
|
+
RSAKey.prototype.decryptBinary = RSADecryptBinary;
|
|
259
|
+
RSAKey.prototype.toASN1HexString = RSAtoASN1Hex;
|
|
260
|
+
RSAKey.prototype.setPrivateEx = RSASetPrivateEx;
|
|
261
|
+
RSAKey.prototype.setPrivateKeyFromASN1HexString = RSASetPrivateKeyFromASN1HexString;
|
|
262
|
+
|