@ohos-ports/react-native-quick-crypto 0.0.0-stage → 1.1.8-beta.0
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/QuickCrypto.podspec +259 -0
- package/README.md +170 -2
- package/android/CMakeLists.txt +155 -0
- package/android/build.gradle +176 -0
- package/android/gradle.properties +6 -0
- package/android/src/main/AndroidManifest.xml +3 -0
- package/android/src/main/cpp/cpp-adapter.cpp +8 -0
- package/android/src/main/java/com/margelo/nitro/quickcrypto/QuickCryptoPackage.java +41 -0
- package/app.plugin.js +3 -0
- package/cpp/argon2/HybridArgon2.cpp +110 -0
- package/cpp/argon2/HybridArgon2.hpp +32 -0
- package/cpp/blake3/HybridBlake3.cpp +120 -0
- package/cpp/blake3/HybridBlake3.hpp +35 -0
- package/cpp/certificate/HybridCertificate.cpp +42 -0
- package/cpp/certificate/HybridCertificate.hpp +16 -0
- package/cpp/cipher/CCMCipher.cpp +211 -0
- package/cpp/cipher/CCMCipher.hpp +24 -0
- package/cpp/cipher/ChaCha20Cipher.cpp +91 -0
- package/cpp/cipher/ChaCha20Cipher.hpp +23 -0
- package/cpp/cipher/ChaCha20Poly1305Cipher.cpp +175 -0
- package/cpp/cipher/ChaCha20Poly1305Cipher.hpp +27 -0
- package/cpp/cipher/GCMCipher.cpp +65 -0
- package/cpp/cipher/GCMCipher.hpp +14 -0
- package/cpp/cipher/HybridCipher.cpp +403 -0
- package/cpp/cipher/HybridCipher.hpp +90 -0
- package/cpp/cipher/HybridCipherFactory.hpp +119 -0
- package/cpp/cipher/HybridRsaCipher.cpp +477 -0
- package/cpp/cipher/HybridRsaCipher.hpp +33 -0
- package/cpp/cipher/OCBCipher.cpp +55 -0
- package/cpp/cipher/OCBCipher.hpp +19 -0
- package/cpp/cipher/XChaCha20Poly1305Cipher.cpp +158 -0
- package/cpp/cipher/XChaCha20Poly1305Cipher.hpp +42 -0
- package/cpp/cipher/XSalsa20Cipher.cpp +127 -0
- package/cpp/cipher/XSalsa20Cipher.hpp +55 -0
- package/cpp/cipher/XSalsa20Poly1305Cipher.cpp +138 -0
- package/cpp/cipher/XSalsa20Poly1305Cipher.hpp +41 -0
- package/cpp/dh/HybridDhKeyPair.cpp +179 -0
- package/cpp/dh/HybridDhKeyPair.hpp +37 -0
- package/cpp/dh/HybridDiffieHellman.cpp +482 -0
- package/cpp/dh/HybridDiffieHellman.hpp +42 -0
- package/cpp/dsa/HybridDsaKeyPair.cpp +128 -0
- package/cpp/dsa/HybridDsaKeyPair.hpp +32 -0
- package/cpp/ec/HybridEcKeyPair.cpp +481 -0
- package/cpp/ec/HybridEcKeyPair.hpp +45 -0
- package/cpp/ecdh/HybridECDH.cpp +251 -0
- package/cpp/ecdh/HybridECDH.hpp +43 -0
- package/cpp/ed25519/HybridEdKeyPair.cpp +360 -0
- package/cpp/ed25519/HybridEdKeyPair.hpp +67 -0
- package/cpp/hash/HybridHash.cpp +190 -0
- package/cpp/hash/HybridHash.hpp +43 -0
- package/cpp/hkdf/HybridHkdf.cpp +115 -0
- package/cpp/hkdf/HybridHkdf.hpp +29 -0
- package/cpp/hmac/HybridHmac.cpp +102 -0
- package/cpp/hmac/HybridHmac.hpp +32 -0
- package/cpp/keys/HybridKeyObjectHandle.cpp +1519 -0
- package/cpp/keys/HybridKeyObjectHandle.hpp +78 -0
- package/cpp/keys/KeyObjectData.cpp +298 -0
- package/cpp/keys/KeyObjectData.hpp +73 -0
- package/cpp/keys/node.h +5 -0
- package/cpp/kmac/HybridKmac.cpp +83 -0
- package/cpp/kmac/HybridKmac.hpp +31 -0
- package/cpp/mldsa/HybridMlDsaKeyPair.cpp +243 -0
- package/cpp/mldsa/HybridMlDsaKeyPair.hpp +49 -0
- package/cpp/mlkem/HybridMlKemKeyPair.cpp +315 -0
- package/cpp/mlkem/HybridMlKemKeyPair.hpp +48 -0
- package/cpp/pbkdf2/HybridPbkdf2.cpp +50 -0
- package/cpp/pbkdf2/HybridPbkdf2.hpp +24 -0
- package/cpp/prime/HybridPrime.cpp +81 -0
- package/cpp/prime/HybridPrime.hpp +20 -0
- package/cpp/random/HybridRandom.cpp +48 -0
- package/cpp/random/HybridRandom.hpp +32 -0
- package/cpp/rsa/HybridRsaKeyPair.cpp +151 -0
- package/cpp/rsa/HybridRsaKeyPair.hpp +40 -0
- package/cpp/scrypt/HybridScrypt.cpp +64 -0
- package/cpp/scrypt/HybridScrypt.hpp +28 -0
- package/cpp/sign/HybridSignHandle.cpp +241 -0
- package/cpp/sign/HybridSignHandle.hpp +36 -0
- package/cpp/sign/HybridVerifyHandle.cpp +207 -0
- package/cpp/sign/HybridVerifyHandle.hpp +36 -0
- package/cpp/sign/SignUtils.hpp +91 -0
- package/cpp/slhdsa/HybridSlhDsaKeyPair.cpp +245 -0
- package/cpp/slhdsa/HybridSlhDsaKeyPair.hpp +48 -0
- package/cpp/turboshake/HybridTurboShake.cpp +379 -0
- package/cpp/turboshake/HybridTurboShake.hpp +28 -0
- package/cpp/utils/HybridUtils.cpp +399 -0
- package/cpp/utils/HybridUtils.hpp +28 -0
- package/cpp/utils/Macros.hpp +68 -0
- package/cpp/utils/QuickCryptoUtils.cpp +44 -0
- package/cpp/utils/QuickCryptoUtils.hpp +186 -0
- package/cpp/utils/base64.h +309 -0
- package/cpp/x509/HybridX509Certificate.cpp +174 -0
- package/cpp/x509/HybridX509Certificate.hpp +51 -0
- package/deps/blake3/LICENSE_A2 +202 -0
- package/deps/blake3/LICENSE_A2LLVM +219 -0
- package/deps/blake3/LICENSE_CC0 +121 -0
- package/deps/blake3/README.md +228 -0
- package/deps/blake3/c/README.md +403 -0
- package/deps/blake3/c/blake3.c +651 -0
- package/deps/blake3/c/blake3.h +86 -0
- package/deps/blake3/c/blake3_dispatch.c +332 -0
- package/deps/blake3/c/blake3_impl.h +333 -0
- package/deps/blake3/c/blake3_neon.c +367 -0
- package/deps/blake3/c/blake3_portable.c +160 -0
- package/deps/fastpbkdf2/fastpbkdf2.c +356 -0
- package/deps/fastpbkdf2/fastpbkdf2.h +68 -0
- package/deps/ncrypto/LICENSE +21 -0
- package/deps/ncrypto/README.md +18 -0
- package/deps/ncrypto/include/dh-primes.h +67 -0
- package/deps/ncrypto/include/ncrypto/aead.h +137 -0
- package/deps/ncrypto/include/ncrypto/version.h +14 -0
- package/deps/ncrypto/include/ncrypto.h +1759 -0
- package/deps/ncrypto/src/aead.cpp +302 -0
- package/deps/ncrypto/src/engine.cpp +93 -0
- package/deps/ncrypto/src/ncrypto.cpp +5426 -0
- package/deps/simdutf/LICENSE-APACHE +201 -0
- package/deps/simdutf/LICENSE-MIT +18 -0
- package/deps/simdutf/README.md +2782 -0
- package/deps/simdutf/include/simdutf/avx512.h +79 -0
- package/deps/simdutf/include/simdutf/base64_implementation.h +158 -0
- package/deps/simdutf/include/simdutf/base64_tables.h +887 -0
- package/deps/simdutf/include/simdutf/common_defs.h +186 -0
- package/deps/simdutf/include/simdutf/compiler_check.h +50 -0
- package/deps/simdutf/include/simdutf/constexpr_ptr.h +138 -0
- package/deps/simdutf/include/simdutf/encoding_types.h +189 -0
- package/deps/simdutf/include/simdutf/error.h +126 -0
- package/deps/simdutf/include/simdutf/implementation.h +7081 -0
- package/deps/simdutf/include/simdutf/internal/isadetection.h +325 -0
- package/deps/simdutf/include/simdutf/portability.h +285 -0
- package/deps/simdutf/include/simdutf/scalar/ascii.h +86 -0
- package/deps/simdutf/include/simdutf/scalar/atomic_util.h +105 -0
- package/deps/simdutf/include/simdutf/scalar/base64.h +911 -0
- package/deps/simdutf/include/simdutf/scalar/latin1.h +26 -0
- package/deps/simdutf/include/simdutf/scalar/latin1_to_utf16/latin1_to_utf16.h +52 -0
- package/deps/simdutf/include/simdutf/scalar/latin1_to_utf32/latin1_to_utf32.h +27 -0
- package/deps/simdutf/include/simdutf/scalar/latin1_to_utf8/latin1_to_utf8.h +191 -0
- package/deps/simdutf/include/simdutf/scalar/swap_bytes.h +35 -0
- package/deps/simdutf/include/simdutf/scalar/utf16.h +226 -0
- package/deps/simdutf/include/simdutf/scalar/utf16_to_latin1/utf16_to_latin1.h +108 -0
- package/deps/simdutf/include/simdutf/scalar/utf16_to_latin1/valid_utf16_to_latin1.h +40 -0
- package/deps/simdutf/include/simdutf/scalar/utf16_to_utf32/utf16_to_utf32.h +86 -0
- package/deps/simdutf/include/simdutf/scalar/utf16_to_utf32/valid_utf16_to_utf32.h +44 -0
- package/deps/simdutf/include/simdutf/scalar/utf16_to_utf8/utf16_to_utf8.h +295 -0
- package/deps/simdutf/include/simdutf/scalar/utf16_to_utf8/valid_utf16_to_utf8.h +91 -0
- package/deps/simdutf/include/simdutf/scalar/utf32.h +82 -0
- package/deps/simdutf/include/simdutf/scalar/utf32_to_latin1/utf32_to_latin1.h +68 -0
- package/deps/simdutf/include/simdutf/scalar/utf32_to_latin1/valid_utf32_to_latin1.h +67 -0
- package/deps/simdutf/include/simdutf/scalar/utf32_to_utf16/utf32_to_utf16.h +84 -0
- package/deps/simdutf/include/simdutf/scalar/utf32_to_utf16/valid_utf32_to_utf16.h +44 -0
- package/deps/simdutf/include/simdutf/scalar/utf32_to_utf8/utf32_to_utf8.h +142 -0
- package/deps/simdutf/include/simdutf/scalar/utf32_to_utf8/valid_utf32_to_utf8.h +72 -0
- package/deps/simdutf/include/simdutf/scalar/utf8.h +326 -0
- package/deps/simdutf/include/simdutf/scalar/utf8_to_latin1/utf8_to_latin1.h +225 -0
- package/deps/simdutf/include/simdutf/scalar/utf8_to_latin1/valid_utf8_to_latin1.h +87 -0
- package/deps/simdutf/include/simdutf/scalar/utf8_to_utf16/utf8_to_utf16.h +342 -0
- package/deps/simdutf/include/simdutf/scalar/utf8_to_utf16/valid_utf8_to_utf16.h +106 -0
- package/deps/simdutf/include/simdutf/scalar/utf8_to_utf32/utf8_to_utf32.h +299 -0
- package/deps/simdutf/include/simdutf/scalar/utf8_to_utf32/valid_utf8_to_utf32.h +83 -0
- package/deps/simdutf/include/simdutf/simdutf_version.h +26 -0
- package/deps/simdutf/include/simdutf.h +26 -0
- package/deps/simdutf/include/simdutf_c.h +342 -0
- package/deps/simdutf/src/arm64/arm_base64.cpp +791 -0
- package/deps/simdutf/src/arm64/arm_convert_latin1_to_utf16.cpp +24 -0
- package/deps/simdutf/src/arm64/arm_convert_latin1_to_utf32.cpp +24 -0
- package/deps/simdutf/src/arm64/arm_convert_latin1_to_utf8.cpp +70 -0
- package/deps/simdutf/src/arm64/arm_convert_utf16_to_latin1.cpp +61 -0
- package/deps/simdutf/src/arm64/arm_convert_utf16_to_utf32.cpp +185 -0
- package/deps/simdutf/src/arm64/arm_convert_utf16_to_utf8.cpp +780 -0
- package/deps/simdutf/src/arm64/arm_convert_utf32_to_latin1.cpp +60 -0
- package/deps/simdutf/src/arm64/arm_convert_utf32_to_utf16.cpp +208 -0
- package/deps/simdutf/src/arm64/arm_convert_utf32_to_utf8.cpp +505 -0
- package/deps/simdutf/src/arm64/arm_convert_utf8_to_latin1.cpp +69 -0
- package/deps/simdutf/src/arm64/arm_convert_utf8_to_utf16.cpp +313 -0
- package/deps/simdutf/src/arm64/arm_convert_utf8_to_utf32.cpp +179 -0
- package/deps/simdutf/src/arm64/arm_find.cpp +199 -0
- package/deps/simdutf/src/arm64/arm_utf16fix.cpp +185 -0
- package/deps/simdutf/src/arm64/arm_validate_utf16.cpp +165 -0
- package/deps/simdutf/src/arm64/arm_validate_utf32le.cpp +65 -0
- package/deps/simdutf/src/arm64/implementation.cpp +1442 -0
- package/deps/simdutf/src/encoding_types.cpp +67 -0
- package/deps/simdutf/src/error.cpp +3 -0
- package/deps/simdutf/src/fallback/implementation.cpp +589 -0
- package/deps/simdutf/src/generic/ascii_validation.h +50 -0
- package/deps/simdutf/src/generic/base64.h +233 -0
- package/deps/simdutf/src/generic/base64lengths.h +63 -0
- package/deps/simdutf/src/generic/buf_block_reader.h +109 -0
- package/deps/simdutf/src/generic/find.h +75 -0
- package/deps/simdutf/src/generic/utf16/change_endianness.h +24 -0
- package/deps/simdutf/src/generic/utf16/count_code_points_bytemask.h +58 -0
- package/deps/simdutf/src/generic/utf16/to_well_formed.h +93 -0
- package/deps/simdutf/src/generic/utf16/utf32_length_from_utf16.h +15 -0
- package/deps/simdutf/src/generic/utf16/utf8_length_from_utf16.h +35 -0
- package/deps/simdutf/src/generic/utf16/utf8_length_from_utf16_bytemask.h +199 -0
- package/deps/simdutf/src/generic/utf16.h +73 -0
- package/deps/simdutf/src/generic/utf32.h +136 -0
- package/deps/simdutf/src/generic/utf8/utf16_length_from_utf8_bytemask.h +53 -0
- package/deps/simdutf/src/generic/utf8.h +92 -0
- package/deps/simdutf/src/generic/utf8_to_latin1/utf8_to_latin1.h +316 -0
- package/deps/simdutf/src/generic/utf8_to_latin1/valid_utf8_to_latin1.h +78 -0
- package/deps/simdutf/src/generic/utf8_to_utf16/utf8_to_utf16.h +332 -0
- package/deps/simdutf/src/generic/utf8_to_utf16/valid_utf8_to_utf16.h +74 -0
- package/deps/simdutf/src/generic/utf8_to_utf32/utf8_to_utf32.h +318 -0
- package/deps/simdutf/src/generic/utf8_to_utf32/valid_utf8_to_utf32.h +42 -0
- package/deps/simdutf/src/generic/utf8_validation/utf8_lookup4_algorithm.h +223 -0
- package/deps/simdutf/src/generic/utf8_validation/utf8_validator.h +84 -0
- package/deps/simdutf/src/generic/validate_utf16.h +164 -0
- package/deps/simdutf/src/generic/validate_utf32.h +99 -0
- package/deps/simdutf/src/haswell/avx2_base64.cpp +837 -0
- package/deps/simdutf/src/haswell/avx2_convert_latin1_to_utf16.cpp +28 -0
- package/deps/simdutf/src/haswell/avx2_convert_latin1_to_utf32.cpp +20 -0
- package/deps/simdutf/src/haswell/avx2_convert_latin1_to_utf8.cpp +83 -0
- package/deps/simdutf/src/haswell/avx2_convert_utf16_to_latin1.cpp +83 -0
- package/deps/simdutf/src/haswell/avx2_convert_utf16_to_utf32.cpp +210 -0
- package/deps/simdutf/src/haswell/avx2_convert_utf16_to_utf8.cpp +602 -0
- package/deps/simdutf/src/haswell/avx2_convert_utf32_to_latin1.cpp +116 -0
- package/deps/simdutf/src/haswell/avx2_convert_utf32_to_utf16.cpp +164 -0
- package/deps/simdutf/src/haswell/avx2_convert_utf32_to_utf8.cpp +569 -0
- package/deps/simdutf/src/haswell/avx2_convert_utf8_to_latin1.cpp +60 -0
- package/deps/simdutf/src/haswell/avx2_convert_utf8_to_utf16.cpp +195 -0
- package/deps/simdutf/src/haswell/avx2_convert_utf8_to_utf32.cpp +135 -0
- package/deps/simdutf/src/haswell/avx2_utf16fix.cpp +173 -0
- package/deps/simdutf/src/haswell/avx2_validate_utf16.cpp +17 -0
- package/deps/simdutf/src/haswell/implementation.cpp +1447 -0
- package/deps/simdutf/src/icelake/icelake_ascii_validation.inl.cpp +19 -0
- package/deps/simdutf/src/icelake/icelake_base64.inl.cpp +630 -0
- package/deps/simdutf/src/icelake/icelake_common.inl.cpp +37 -0
- package/deps/simdutf/src/icelake/icelake_convert_latin1_to_utf16.inl.cpp +36 -0
- package/deps/simdutf/src/icelake/icelake_convert_latin1_to_utf32.inl.cpp +23 -0
- package/deps/simdutf/src/icelake/icelake_convert_latin1_to_utf8.inl.cpp +107 -0
- package/deps/simdutf/src/icelake/icelake_convert_utf16_to_latin1.inl.cpp +103 -0
- package/deps/simdutf/src/icelake/icelake_convert_utf16_to_utf32.inl.cpp +136 -0
- package/deps/simdutf/src/icelake/icelake_convert_utf16_to_utf8.inl.cpp +206 -0
- package/deps/simdutf/src/icelake/icelake_convert_utf32_to_latin1.inl.cpp +74 -0
- package/deps/simdutf/src/icelake/icelake_convert_utf32_to_utf16.inl.cpp +338 -0
- package/deps/simdutf/src/icelake/icelake_convert_utf32_to_utf8.inl.cpp +574 -0
- package/deps/simdutf/src/icelake/icelake_convert_utf8_to_latin1.inl.cpp +104 -0
- package/deps/simdutf/src/icelake/icelake_convert_utf8_to_utf16.inl.cpp +75 -0
- package/deps/simdutf/src/icelake/icelake_convert_valid_utf8_to_latin1.inl.cpp +69 -0
- package/deps/simdutf/src/icelake/icelake_find.inl.cpp +146 -0
- package/deps/simdutf/src/icelake/icelake_from_utf8.inl.cpp +266 -0
- package/deps/simdutf/src/icelake/icelake_from_valid_utf8.inl.cpp +136 -0
- package/deps/simdutf/src/icelake/icelake_macros.inl.cpp +143 -0
- package/deps/simdutf/src/icelake/icelake_utf16fix.cpp +138 -0
- package/deps/simdutf/src/icelake/icelake_utf32_validation.inl.cpp +63 -0
- package/deps/simdutf/src/icelake/icelake_utf8_common.inl.cpp +753 -0
- package/deps/simdutf/src/icelake/icelake_utf8_length_from_utf16.inl.cpp +269 -0
- package/deps/simdutf/src/icelake/icelake_utf8_validation.inl.cpp +116 -0
- package/deps/simdutf/src/icelake/implementation.cpp +1903 -0
- package/deps/simdutf/src/implementation.cpp +2526 -0
- package/deps/simdutf/src/lasx/implementation.cpp +1531 -0
- package/deps/simdutf/src/lasx/lasx_base64.cpp +695 -0
- package/deps/simdutf/src/lasx/lasx_convert_latin1_to_utf16.cpp +76 -0
- package/deps/simdutf/src/lasx/lasx_convert_latin1_to_utf32.cpp +55 -0
- package/deps/simdutf/src/lasx/lasx_convert_latin1_to_utf8.cpp +65 -0
- package/deps/simdutf/src/lasx/lasx_convert_utf16_to_latin1.cpp +64 -0
- package/deps/simdutf/src/lasx/lasx_convert_utf16_to_utf32.cpp +183 -0
- package/deps/simdutf/src/lasx/lasx_convert_utf16_to_utf8.cpp +550 -0
- package/deps/simdutf/src/lasx/lasx_convert_utf32_to_latin1.cpp +73 -0
- package/deps/simdutf/src/lasx/lasx_convert_utf32_to_utf16.cpp +218 -0
- package/deps/simdutf/src/lasx/lasx_convert_utf32_to_utf8.cpp +589 -0
- package/deps/simdutf/src/lasx/lasx_convert_utf8_to_latin1.cpp +72 -0
- package/deps/simdutf/src/lasx/lasx_convert_utf8_to_utf16.cpp +296 -0
- package/deps/simdutf/src/lasx/lasx_convert_utf8_to_utf32.cpp +190 -0
- package/deps/simdutf/src/lasx/lasx_find.cpp +64 -0
- package/deps/simdutf/src/lasx/lasx_validate_utf16.cpp +13 -0
- package/deps/simdutf/src/lasx/lasx_validate_utf32le.cpp +84 -0
- package/deps/simdutf/src/lsx/implementation.cpp +1417 -0
- package/deps/simdutf/src/lsx/lsx_base64.cpp +675 -0
- package/deps/simdutf/src/lsx/lsx_convert_latin1_to_utf16.cpp +39 -0
- package/deps/simdutf/src/lsx/lsx_convert_latin1_to_utf32.cpp +27 -0
- package/deps/simdutf/src/lsx/lsx_convert_latin1_to_utf8.cpp +56 -0
- package/deps/simdutf/src/lsx/lsx_convert_utf16_to_latin1.cpp +64 -0
- package/deps/simdutf/src/lsx/lsx_convert_utf16_to_utf32.cpp +133 -0
- package/deps/simdutf/src/lsx/lsx_convert_utf16_to_utf8.cpp +518 -0
- package/deps/simdutf/src/lsx/lsx_convert_utf32_to_latin1.cpp +66 -0
- package/deps/simdutf/src/lsx/lsx_convert_utf32_to_utf16.cpp +155 -0
- package/deps/simdutf/src/lsx/lsx_convert_utf32_to_utf8.cpp +459 -0
- package/deps/simdutf/src/lsx/lsx_convert_utf8_to_latin1.cpp +75 -0
- package/deps/simdutf/src/lsx/lsx_convert_utf8_to_utf16.cpp +291 -0
- package/deps/simdutf/src/lsx/lsx_convert_utf8_to_utf32.cpp +179 -0
- package/deps/simdutf/src/lsx/lsx_find.cpp +60 -0
- package/deps/simdutf/src/lsx/lsx_validate_utf16.cpp +13 -0
- package/deps/simdutf/src/lsx/lsx_validate_utf32le.cpp +68 -0
- package/deps/simdutf/src/ppc64/implementation.cpp +992 -0
- package/deps/simdutf/src/ppc64/ppc64_base64.cpp +480 -0
- package/deps/simdutf/src/ppc64/ppc64_base64_internal_tests.cpp +401 -0
- package/deps/simdutf/src/ppc64/ppc64_convert_latin1_to_utf16.cpp +12 -0
- package/deps/simdutf/src/ppc64/ppc64_convert_latin1_to_utf32.cpp +12 -0
- package/deps/simdutf/src/ppc64/ppc64_convert_latin1_to_utf8.cpp +149 -0
- package/deps/simdutf/src/ppc64/ppc64_convert_utf16_to_latin1.cpp +67 -0
- package/deps/simdutf/src/ppc64/ppc64_convert_utf16_to_utf32.cpp +87 -0
- package/deps/simdutf/src/ppc64/ppc64_convert_utf16_to_utf8.cpp +296 -0
- package/deps/simdutf/src/ppc64/ppc64_convert_utf32_to_latin1.cpp +57 -0
- package/deps/simdutf/src/ppc64/ppc64_convert_utf32_to_utf16.cpp +117 -0
- package/deps/simdutf/src/ppc64/ppc64_convert_utf32_to_utf8.cpp +166 -0
- package/deps/simdutf/src/ppc64/ppc64_convert_utf8_to_latin1.cpp +69 -0
- package/deps/simdutf/src/ppc64/ppc64_convert_utf8_to_utf16.cpp +211 -0
- package/deps/simdutf/src/ppc64/ppc64_convert_utf8_to_utf32.cpp +153 -0
- package/deps/simdutf/src/ppc64/ppc64_utf16_to_utf8_tables.h +1011 -0
- package/deps/simdutf/src/ppc64/ppc64_utf8_length_from_latin1.cpp +37 -0
- package/deps/simdutf/src/ppc64/ppc64_validate_utf16.cpp +19 -0
- package/deps/simdutf/src/ppc64/templates.cpp +91 -0
- package/deps/simdutf/src/rvv/implementation.cpp +138 -0
- package/deps/simdutf/src/rvv/rvv_find.cpp +27 -0
- package/deps/simdutf/src/rvv/rvv_helpers.inl.cpp +23 -0
- package/deps/simdutf/src/rvv/rvv_latin1_to.inl.cpp +71 -0
- package/deps/simdutf/src/rvv/rvv_length_from.inl.cpp +164 -0
- package/deps/simdutf/src/rvv/rvv_utf16_to.inl.cpp +399 -0
- package/deps/simdutf/src/rvv/rvv_utf16fix.cpp +110 -0
- package/deps/simdutf/src/rvv/rvv_utf32_to.inl.cpp +307 -0
- package/deps/simdutf/src/rvv/rvv_utf8_to.inl.cpp +435 -0
- package/deps/simdutf/src/rvv/rvv_validate.inl.cpp +275 -0
- package/deps/simdutf/src/simdutf/arm64/begin.h +2 -0
- package/deps/simdutf/src/simdutf/arm64/bitmanipulation.h +34 -0
- package/deps/simdutf/src/simdutf/arm64/end.h +2 -0
- package/deps/simdutf/src/simdutf/arm64/implementation.h +307 -0
- package/deps/simdutf/src/simdutf/arm64/intrinsics.h +10 -0
- package/deps/simdutf/src/simdutf/arm64/simd.h +547 -0
- package/deps/simdutf/src/simdutf/arm64/simd16-inl.h +403 -0
- package/deps/simdutf/src/simdutf/arm64/simd32-inl.h +129 -0
- package/deps/simdutf/src/simdutf/arm64/simd64-inl.h +28 -0
- package/deps/simdutf/src/simdutf/arm64.h +43 -0
- package/deps/simdutf/src/simdutf/fallback/begin.h +1 -0
- package/deps/simdutf/src/simdutf/fallback/bitmanipulation.h +13 -0
- package/deps/simdutf/src/simdutf/fallback/end.h +1 -0
- package/deps/simdutf/src/simdutf/fallback/implementation.h +331 -0
- package/deps/simdutf/src/simdutf/fallback.h +42 -0
- package/deps/simdutf/src/simdutf/haswell/begin.h +15 -0
- package/deps/simdutf/src/simdutf/haswell/bitmanipulation.h +35 -0
- package/deps/simdutf/src/simdutf/haswell/end.h +13 -0
- package/deps/simdutf/src/simdutf/haswell/implementation.h +338 -0
- package/deps/simdutf/src/simdutf/haswell/intrinsics.h +67 -0
- package/deps/simdutf/src/simdutf/haswell/simd.h +363 -0
- package/deps/simdutf/src/simdutf/haswell/simd16-inl.h +261 -0
- package/deps/simdutf/src/simdutf/haswell/simd32-inl.h +111 -0
- package/deps/simdutf/src/simdutf/haswell/simd64-inl.h +34 -0
- package/deps/simdutf/src/simdutf/haswell.h +63 -0
- package/deps/simdutf/src/simdutf/icelake/begin.h +14 -0
- package/deps/simdutf/src/simdutf/icelake/bitmanipulation.h +44 -0
- package/deps/simdutf/src/simdutf/icelake/end.h +12 -0
- package/deps/simdutf/src/simdutf/icelake/implementation.h +346 -0
- package/deps/simdutf/src/simdutf/icelake/intrinsics.h +138 -0
- package/deps/simdutf/src/simdutf/icelake/simd.h +17 -0
- package/deps/simdutf/src/simdutf/icelake/simd16-inl.h +90 -0
- package/deps/simdutf/src/simdutf/icelake/simd32-inl.h +47 -0
- package/deps/simdutf/src/simdutf/icelake.h +81 -0
- package/deps/simdutf/src/simdutf/lasx/begin.h +8 -0
- package/deps/simdutf/src/simdutf/lasx/bitmanipulation.h +25 -0
- package/deps/simdutf/src/simdutf/lasx/end.h +8 -0
- package/deps/simdutf/src/simdutf/lasx/implementation.h +310 -0
- package/deps/simdutf/src/simdutf/lasx/intrinsics.h +319 -0
- package/deps/simdutf/src/simdutf/lasx/simd.h +551 -0
- package/deps/simdutf/src/simdutf/lasx/simd16-inl.h +234 -0
- package/deps/simdutf/src/simdutf/lasx/simd32-inl.h +74 -0
- package/deps/simdutf/src/simdutf/lasx/simd64-inl.h +52 -0
- package/deps/simdutf/src/simdutf/lasx.h +49 -0
- package/deps/simdutf/src/simdutf/lsx/begin.h +2 -0
- package/deps/simdutf/src/simdutf/lsx/bitmanipulation.h +25 -0
- package/deps/simdutf/src/simdutf/lsx/end.h +2 -0
- package/deps/simdutf/src/simdutf/lsx/implementation.h +309 -0
- package/deps/simdutf/src/simdutf/lsx/intrinsics.h +196 -0
- package/deps/simdutf/src/simdutf/lsx/simd.h +421 -0
- package/deps/simdutf/src/simdutf/lsx/simd16-inl.h +242 -0
- package/deps/simdutf/src/simdutf/lsx/simd32-inl.h +69 -0
- package/deps/simdutf/src/simdutf/lsx/simd64-inl.h +50 -0
- package/deps/simdutf/src/simdutf/lsx.h +52 -0
- package/deps/simdutf/src/simdutf/ppc64/begin.h +1 -0
- package/deps/simdutf/src/simdutf/ppc64/bitmanipulation.h +29 -0
- package/deps/simdutf/src/simdutf/ppc64/end.h +1 -0
- package/deps/simdutf/src/simdutf/ppc64/implementation.h +348 -0
- package/deps/simdutf/src/simdutf/ppc64/intrinsics.h +19 -0
- package/deps/simdutf/src/simdutf/ppc64/simd.h +177 -0
- package/deps/simdutf/src/simdutf/ppc64/simd16-inl.h +327 -0
- package/deps/simdutf/src/simdutf/ppc64/simd32-inl.h +247 -0
- package/deps/simdutf/src/simdutf/ppc64/simd8-inl.h +618 -0
- package/deps/simdutf/src/simdutf/ppc64.h +40 -0
- package/deps/simdutf/src/simdutf/rvv/begin.h +7 -0
- package/deps/simdutf/src/simdutf/rvv/end.h +7 -0
- package/deps/simdutf/src/simdutf/rvv/implementation.h +321 -0
- package/deps/simdutf/src/simdutf/rvv/intrinsics.h +131 -0
- package/deps/simdutf/src/simdutf/rvv.h +41 -0
- package/deps/simdutf/src/simdutf/westmere/begin.h +8 -0
- package/deps/simdutf/src/simdutf/westmere/bitmanipulation.h +37 -0
- package/deps/simdutf/src/simdutf/westmere/end.h +8 -0
- package/deps/simdutf/src/simdutf/westmere/implementation.h +338 -0
- package/deps/simdutf/src/simdutf/westmere/intrinsics.h +38 -0
- package/deps/simdutf/src/simdutf/westmere/simd.h +379 -0
- package/deps/simdutf/src/simdutf/westmere/simd16-inl.h +242 -0
- package/deps/simdutf/src/simdutf/westmere/simd32-inl.h +151 -0
- package/deps/simdutf/src/simdutf/westmere/simd64-inl.h +33 -0
- package/deps/simdutf/src/simdutf/westmere.h +59 -0
- package/deps/simdutf/src/simdutf.cpp +152 -0
- package/deps/simdutf/src/simdutf_c.cpp +525 -0
- package/deps/simdutf/src/tables/utf16_to_utf8_tables.h +768 -0
- package/deps/simdutf/src/tables/utf32_to_utf16_tables.h +53 -0
- package/deps/simdutf/src/tables/utf8_to_utf16_tables.h +826 -0
- package/deps/simdutf/src/westmere/implementation.cpp +1479 -0
- package/deps/simdutf/src/westmere/internal/loader.cpp +7 -0
- package/deps/simdutf/src/westmere/internal/write_v_u16_11bits_to_utf8.cpp +66 -0
- package/deps/simdutf/src/westmere/sse_base64.cpp +672 -0
- package/deps/simdutf/src/westmere/sse_convert_latin1_to_utf16.cpp +21 -0
- package/deps/simdutf/src/westmere/sse_convert_latin1_to_utf32.cpp +31 -0
- package/deps/simdutf/src/westmere/sse_convert_latin1_to_utf8.cpp +71 -0
- package/deps/simdutf/src/westmere/sse_convert_utf16_to_latin1.cpp +70 -0
- package/deps/simdutf/src/westmere/sse_convert_utf16_to_utf32.cpp +206 -0
- package/deps/simdutf/src/westmere/sse_convert_utf16_to_utf8.cpp +504 -0
- package/deps/simdutf/src/westmere/sse_convert_utf32_to_latin1.cpp +82 -0
- package/deps/simdutf/src/westmere/sse_convert_utf32_to_utf16.cpp +209 -0
- package/deps/simdutf/src/westmere/sse_convert_utf32_to_utf8.cpp +589 -0
- package/deps/simdutf/src/westmere/sse_convert_utf8_to_latin1.cpp +58 -0
- package/deps/simdutf/src/westmere/sse_convert_utf8_to_utf16.cpp +197 -0
- package/deps/simdutf/src/westmere/sse_convert_utf8_to_utf32.cpp +141 -0
- package/deps/simdutf/src/westmere/sse_utf16fix.cpp +82 -0
- package/deps/simdutf/src/westmere/sse_validate_utf16.cpp +17 -0
- package/jest/index.js +16 -0
- package/lib/commonjs/argon2.js +88 -0
- package/lib/commonjs/argon2.js.map +1 -0
- package/lib/commonjs/blake3.js +99 -0
- package/lib/commonjs/blake3.js.map +1 -0
- package/lib/commonjs/certificate.js +35 -0
- package/lib/commonjs/certificate.js.map +1 -0
- package/lib/commonjs/cipher.js +299 -0
- package/lib/commonjs/cipher.js.map +1 -0
- package/lib/commonjs/constants.js +32 -0
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/dh-groups.js +29 -0
- package/lib/commonjs/dh-groups.js.map +1 -0
- package/lib/commonjs/dhKeyPair.js +112 -0
- package/lib/commonjs/dhKeyPair.js.map +1 -0
- package/lib/commonjs/diffie-hellman.js +151 -0
- package/lib/commonjs/diffie-hellman.js.map +1 -0
- package/lib/commonjs/dsa.js +101 -0
- package/lib/commonjs/dsa.js.map +1 -0
- package/lib/commonjs/ec.js +370 -0
- package/lib/commonjs/ec.js.map +1 -0
- package/lib/commonjs/ecdh.js +109 -0
- package/lib/commonjs/ecdh.js.map +1 -0
- package/lib/commonjs/ed.js +443 -0
- package/lib/commonjs/ed.js.map +1 -0
- package/lib/commonjs/expo-plugin/@types.js +2 -0
- package/lib/commonjs/expo-plugin/@types.js.map +1 -0
- package/lib/commonjs/expo-plugin/withRNQC.js +25 -0
- package/lib/commonjs/expo-plugin/withRNQC.js.map +1 -0
- package/lib/commonjs/expo-plugin/withSodiumAndroid.js +25 -0
- package/lib/commonjs/expo-plugin/withSodiumAndroid.js.map +1 -0
- package/lib/commonjs/expo-plugin/withSodiumIos.js +23 -0
- package/lib/commonjs/expo-plugin/withSodiumIos.js.map +1 -0
- package/lib/commonjs/expo-plugin/withXCode.js +109 -0
- package/lib/commonjs/expo-plugin/withXCode.js.map +1 -0
- package/lib/commonjs/hash.js +291 -0
- package/lib/commonjs/hash.js.map +1 -0
- package/lib/commonjs/hkdf.js +178 -0
- package/lib/commonjs/hkdf.js.map +1 -0
- package/lib/commonjs/hmac.js +125 -0
- package/lib/commonjs/hmac.js.map +1 -0
- package/lib/commonjs/index.js +356 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/keys/classes.js +280 -0
- package/lib/commonjs/keys/classes.js.map +1 -0
- package/lib/commonjs/keys/generateKeyPair.js +237 -0
- package/lib/commonjs/keys/generateKeyPair.js.map +1 -0
- package/lib/commonjs/keys/index.js +381 -0
- package/lib/commonjs/keys/index.js.map +1 -0
- package/lib/commonjs/keys/publicCipher.js +171 -0
- package/lib/commonjs/keys/publicCipher.js.map +1 -0
- package/lib/commonjs/keys/signVerify.js +227 -0
- package/lib/commonjs/keys/signVerify.js.map +1 -0
- package/lib/commonjs/keys/utils.js +181 -0
- package/lib/commonjs/keys/utils.js.map +1 -0
- package/lib/commonjs/mldsa.js +69 -0
- package/lib/commonjs/mldsa.js.map +1 -0
- package/lib/commonjs/mlkem.js +219 -0
- package/lib/commonjs/mlkem.js.map +1 -0
- package/lib/commonjs/native-nitro-bridge.js +344 -0
- package/lib/commonjs/nitro-node-shim.js +23 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/pbkdf2.js +106 -0
- package/lib/commonjs/pbkdf2.js.map +1 -0
- package/lib/commonjs/prime.js +84 -0
- package/lib/commonjs/prime.js.map +1 -0
- package/lib/commonjs/random.js +296 -0
- package/lib/commonjs/random.js.map +1 -0
- package/lib/commonjs/rsa.js +213 -0
- package/lib/commonjs/rsa.js.map +1 -0
- package/lib/commonjs/scrypt.js +139 -0
- package/lib/commonjs/scrypt.js.map +1 -0
- package/lib/commonjs/slhdsa.js +70 -0
- package/lib/commonjs/slhdsa.js.map +1 -0
- package/lib/commonjs/specs/argon2.nitro.js +6 -0
- package/lib/commonjs/specs/argon2.nitro.js.map +1 -0
- package/lib/commonjs/specs/blake3.nitro.js +6 -0
- package/lib/commonjs/specs/blake3.nitro.js.map +1 -0
- package/lib/commonjs/specs/certificate.nitro.js +6 -0
- package/lib/commonjs/specs/certificate.nitro.js.map +1 -0
- package/lib/commonjs/specs/cipher.nitro.js +6 -0
- package/lib/commonjs/specs/cipher.nitro.js.map +1 -0
- package/lib/commonjs/specs/dhKeyPair.nitro.js +6 -0
- package/lib/commonjs/specs/dhKeyPair.nitro.js.map +1 -0
- package/lib/commonjs/specs/diffie-hellman.nitro.js +6 -0
- package/lib/commonjs/specs/diffie-hellman.nitro.js.map +1 -0
- package/lib/commonjs/specs/dsaKeyPair.nitro.js +6 -0
- package/lib/commonjs/specs/dsaKeyPair.nitro.js.map +1 -0
- package/lib/commonjs/specs/ecKeyPair.nitro.js +6 -0
- package/lib/commonjs/specs/ecKeyPair.nitro.js.map +1 -0
- package/lib/commonjs/specs/ecdh.nitro.js +6 -0
- package/lib/commonjs/specs/ecdh.nitro.js.map +1 -0
- package/lib/commonjs/specs/edKeyPair.nitro.js +6 -0
- package/lib/commonjs/specs/edKeyPair.nitro.js.map +1 -0
- package/lib/commonjs/specs/hash.nitro.js +6 -0
- package/lib/commonjs/specs/hash.nitro.js.map +1 -0
- package/lib/commonjs/specs/hkdf.nitro.js +6 -0
- package/lib/commonjs/specs/hkdf.nitro.js.map +1 -0
- package/lib/commonjs/specs/hmac.nitro.js +6 -0
- package/lib/commonjs/specs/hmac.nitro.js.map +1 -0
- package/lib/commonjs/specs/keyObjectHandle.nitro.js +6 -0
- package/lib/commonjs/specs/keyObjectHandle.nitro.js.map +1 -0
- package/lib/commonjs/specs/kmac.nitro.js +6 -0
- package/lib/commonjs/specs/kmac.nitro.js.map +1 -0
- package/lib/commonjs/specs/mlDsaKeyPair.nitro.js +6 -0
- package/lib/commonjs/specs/mlDsaKeyPair.nitro.js.map +1 -0
- package/lib/commonjs/specs/mlKemKeyPair.nitro.js +6 -0
- package/lib/commonjs/specs/mlKemKeyPair.nitro.js.map +1 -0
- package/lib/commonjs/specs/pbkdf2.nitro.js +6 -0
- package/lib/commonjs/specs/pbkdf2.nitro.js.map +1 -0
- package/lib/commonjs/specs/prime.nitro.js +6 -0
- package/lib/commonjs/specs/prime.nitro.js.map +1 -0
- package/lib/commonjs/specs/random.nitro.js +6 -0
- package/lib/commonjs/specs/random.nitro.js.map +1 -0
- package/lib/commonjs/specs/rsaCipher.nitro.js +6 -0
- package/lib/commonjs/specs/rsaCipher.nitro.js.map +1 -0
- package/lib/commonjs/specs/rsaKeyPair.nitro.js +6 -0
- package/lib/commonjs/specs/rsaKeyPair.nitro.js.map +1 -0
- package/lib/commonjs/specs/scrypt.nitro.js +6 -0
- package/lib/commonjs/specs/scrypt.nitro.js.map +1 -0
- package/lib/commonjs/specs/sign.nitro.js +6 -0
- package/lib/commonjs/specs/sign.nitro.js.map +1 -0
- package/lib/commonjs/specs/slhDsaKeyPair.nitro.js +6 -0
- package/lib/commonjs/specs/slhDsaKeyPair.nitro.js.map +1 -0
- package/lib/commonjs/specs/turboshake.nitro.js +6 -0
- package/lib/commonjs/specs/turboshake.nitro.js.map +1 -0
- package/lib/commonjs/specs/utils.nitro.js +6 -0
- package/lib/commonjs/specs/utils.nitro.js.map +1 -0
- package/lib/commonjs/specs/x509certificate.nitro.js +6 -0
- package/lib/commonjs/specs/x509certificate.nitro.js.map +1 -0
- package/lib/commonjs/subtle.js +3211 -0
- package/lib/commonjs/subtle.js.map +1 -0
- package/lib/commonjs/utils/cipher.js +75 -0
- package/lib/commonjs/utils/cipher.js.map +1 -0
- package/lib/commonjs/utils/conversion.js +249 -0
- package/lib/commonjs/utils/conversion.js.map +1 -0
- package/lib/commonjs/utils/errors.js +73 -0
- package/lib/commonjs/utils/errors.js.map +1 -0
- package/lib/commonjs/utils/hashnames.js +122 -0
- package/lib/commonjs/utils/hashnames.js.map +1 -0
- package/lib/commonjs/utils/index.js +83 -0
- package/lib/commonjs/utils/index.js.map +1 -0
- package/lib/commonjs/utils/noble.js +82 -0
- package/lib/commonjs/utils/noble.js.map +1 -0
- package/lib/commonjs/utils/timingSafeEqual.js +29 -0
- package/lib/commonjs/utils/timingSafeEqual.js.map +1 -0
- package/lib/commonjs/utils/types.js +55 -0
- package/lib/commonjs/utils/types.js.map +1 -0
- package/lib/commonjs/utils/validation.js +144 -0
- package/lib/commonjs/utils/validation.js.map +1 -0
- package/lib/commonjs/x509certificate.js +189 -0
- package/lib/commonjs/x509certificate.js.map +1 -0
- package/lib/module/argon2.js +83 -0
- package/lib/module/argon2.js.map +1 -0
- package/lib/module/blake3.js +91 -0
- package/lib/module/blake3.js.map +1 -0
- package/lib/module/certificate.js +30 -0
- package/lib/module/certificate.js.map +1 -0
- package/lib/module/cipher.js +291 -0
- package/lib/module/cipher.js.map +1 -0
- package/lib/module/constants.js +28 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/dh-groups.js +25 -0
- package/lib/module/dh-groups.js.map +1 -0
- package/lib/module/dhKeyPair.js +105 -0
- package/lib/module/dhKeyPair.js.map +1 -0
- package/lib/module/diffie-hellman.js +145 -0
- package/lib/module/diffie-hellman.js.map +1 -0
- package/lib/module/dsa.js +94 -0
- package/lib/module/dsa.js.map +1 -0
- package/lib/module/ec.js +358 -0
- package/lib/module/ec.js.map +1 -0
- package/lib/module/ecdh.js +103 -0
- package/lib/module/ecdh.js.map +1 -0
- package/lib/module/ed.js +433 -0
- package/lib/module/ed.js.map +1 -0
- package/lib/module/expo-plugin/@types.js +2 -0
- package/lib/module/expo-plugin/@types.js.map +1 -0
- package/lib/module/expo-plugin/withRNQC.js +21 -0
- package/lib/module/expo-plugin/withRNQC.js.map +1 -0
- package/lib/module/expo-plugin/withSodiumAndroid.js +20 -0
- package/lib/module/expo-plugin/withSodiumAndroid.js.map +1 -0
- package/lib/module/expo-plugin/withSodiumIos.js +17 -0
- package/lib/module/expo-plugin/withSodiumIos.js.map +1 -0
- package/lib/module/expo-plugin/withXCode.js +101 -0
- package/lib/module/expo-plugin/withXCode.js.map +1 -0
- package/lib/module/hash.js +282 -0
- package/lib/module/hash.js.map +1 -0
- package/lib/module/hkdf.js +168 -0
- package/lib/module/hkdf.js.map +1 -0
- package/lib/module/hmac.js +120 -0
- package/lib/module/hmac.js.map +1 -0
- package/lib/module/index.js +115 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/keys/classes.js +271 -0
- package/lib/module/keys/classes.js.map +1 -0
- package/lib/module/keys/generateKeyPair.js +231 -0
- package/lib/module/keys/generateKeyPair.js.map +1 -0
- package/lib/module/keys/index.js +246 -0
- package/lib/module/keys/index.js.map +1 -0
- package/lib/module/keys/publicCipher.js +164 -0
- package/lib/module/keys/publicCipher.js.map +1 -0
- package/lib/module/keys/signVerify.js +217 -0
- package/lib/module/keys/signVerify.js.map +1 -0
- package/lib/module/keys/utils.js +170 -0
- package/lib/module/keys/utils.js.map +1 -0
- package/lib/module/mldsa.js +63 -0
- package/lib/module/mldsa.js.map +1 -0
- package/lib/module/mlkem.js +211 -0
- package/lib/module/mlkem.js.map +1 -0
- package/lib/module/pbkdf2.js +100 -0
- package/lib/module/pbkdf2.js.map +1 -0
- package/lib/module/prime.js +77 -0
- package/lib/module/prime.js.map +1 -0
- package/lib/module/random.js +284 -0
- package/lib/module/random.js.map +1 -0
- package/lib/module/rsa.js +205 -0
- package/lib/module/rsa.js.map +1 -0
- package/lib/module/scrypt.js +134 -0
- package/lib/module/scrypt.js.map +1 -0
- package/lib/module/slhdsa.js +64 -0
- package/lib/module/slhdsa.js.map +1 -0
- package/lib/module/specs/argon2.nitro.js +4 -0
- package/lib/module/specs/argon2.nitro.js.map +1 -0
- package/lib/module/specs/blake3.nitro.js +4 -0
- package/lib/module/specs/blake3.nitro.js.map +1 -0
- package/lib/module/specs/certificate.nitro.js +4 -0
- package/lib/module/specs/certificate.nitro.js.map +1 -0
- package/lib/module/specs/cipher.nitro.js +4 -0
- package/lib/module/specs/cipher.nitro.js.map +1 -0
- package/lib/module/specs/dhKeyPair.nitro.js +4 -0
- package/lib/module/specs/dhKeyPair.nitro.js.map +1 -0
- package/lib/module/specs/diffie-hellman.nitro.js +4 -0
- package/lib/module/specs/diffie-hellman.nitro.js.map +1 -0
- package/lib/module/specs/dsaKeyPair.nitro.js +4 -0
- package/lib/module/specs/dsaKeyPair.nitro.js.map +1 -0
- package/lib/module/specs/ecKeyPair.nitro.js +4 -0
- package/lib/module/specs/ecKeyPair.nitro.js.map +1 -0
- package/lib/module/specs/ecdh.nitro.js +4 -0
- package/lib/module/specs/ecdh.nitro.js.map +1 -0
- package/lib/module/specs/edKeyPair.nitro.js +4 -0
- package/lib/module/specs/edKeyPair.nitro.js.map +1 -0
- package/lib/module/specs/hash.nitro.js +4 -0
- package/lib/module/specs/hash.nitro.js.map +1 -0
- package/lib/module/specs/hkdf.nitro.js +4 -0
- package/lib/module/specs/hkdf.nitro.js.map +1 -0
- package/lib/module/specs/hmac.nitro.js +4 -0
- package/lib/module/specs/hmac.nitro.js.map +1 -0
- package/lib/module/specs/keyObjectHandle.nitro.js +4 -0
- package/lib/module/specs/keyObjectHandle.nitro.js.map +1 -0
- package/lib/module/specs/kmac.nitro.js +4 -0
- package/lib/module/specs/kmac.nitro.js.map +1 -0
- package/lib/module/specs/mlDsaKeyPair.nitro.js +4 -0
- package/lib/module/specs/mlDsaKeyPair.nitro.js.map +1 -0
- package/lib/module/specs/mlKemKeyPair.nitro.js +4 -0
- package/lib/module/specs/mlKemKeyPair.nitro.js.map +1 -0
- package/lib/module/specs/pbkdf2.nitro.js +4 -0
- package/lib/module/specs/pbkdf2.nitro.js.map +1 -0
- package/lib/module/specs/prime.nitro.js +4 -0
- package/lib/module/specs/prime.nitro.js.map +1 -0
- package/lib/module/specs/random.nitro.js +4 -0
- package/lib/module/specs/random.nitro.js.map +1 -0
- package/lib/module/specs/rsaCipher.nitro.js +4 -0
- package/lib/module/specs/rsaCipher.nitro.js.map +1 -0
- package/lib/module/specs/rsaKeyPair.nitro.js +4 -0
- package/lib/module/specs/rsaKeyPair.nitro.js.map +1 -0
- package/lib/module/specs/scrypt.nitro.js +4 -0
- package/lib/module/specs/scrypt.nitro.js.map +1 -0
- package/lib/module/specs/sign.nitro.js +4 -0
- package/lib/module/specs/sign.nitro.js.map +1 -0
- package/lib/module/specs/slhDsaKeyPair.nitro.js +4 -0
- package/lib/module/specs/slhDsaKeyPair.nitro.js.map +1 -0
- package/lib/module/specs/turboshake.nitro.js +4 -0
- package/lib/module/specs/turboshake.nitro.js.map +1 -0
- package/lib/module/specs/utils.nitro.js +4 -0
- package/lib/module/specs/utils.nitro.js.map +1 -0
- package/lib/module/specs/x509certificate.nitro.js +4 -0
- package/lib/module/specs/x509certificate.nitro.js.map +1 -0
- package/lib/module/subtle.js +3205 -0
- package/lib/module/subtle.js.map +1 -0
- package/lib/module/utils/cipher.js +67 -0
- package/lib/module/utils/cipher.js.map +1 -0
- package/lib/module/utils/conversion.js +205 -0
- package/lib/module/utils/conversion.js.map +1 -0
- package/lib/module/utils/errors.js +67 -0
- package/lib/module/utils/errors.js.map +1 -0
- package/lib/module/utils/hashnames.js +120 -0
- package/lib/module/utils/hashnames.js.map +1 -0
- package/lib/module/utils/index.js +10 -0
- package/lib/module/utils/index.js.map +1 -0
- package/lib/module/utils/noble.js +76 -0
- package/lib/module/utils/noble.js.map +1 -0
- package/lib/module/utils/timingSafeEqual.js +25 -0
- package/lib/module/utils/timingSafeEqual.js.map +1 -0
- package/lib/module/utils/types.js +57 -0
- package/lib/module/utils/types.js.map +1 -0
- package/lib/module/utils/validation.js +131 -0
- package/lib/module/utils/validation.js.map +1 -0
- package/lib/module/x509certificate.js +184 -0
- package/lib/module/x509certificate.js.map +1 -0
- package/lib/typescript/argon2.d.ts +16 -0
- package/lib/typescript/argon2.d.ts.map +1 -0
- package/lib/typescript/blake3.d.ts +33 -0
- package/lib/typescript/blake3.d.ts.map +1 -0
- package/lib/typescript/certificate.d.ts +8 -0
- package/lib/typescript/certificate.d.ts.map +1 -0
- package/lib/typescript/cipher.d.ts +75 -0
- package/lib/typescript/cipher.d.ts.map +1 -0
- package/lib/typescript/constants.d.ts +21 -0
- package/lib/typescript/constants.d.ts.map +1 -0
- package/lib/typescript/dh-groups.d.ts +5 -0
- package/lib/typescript/dh-groups.d.ts.map +1 -0
- package/lib/typescript/dhKeyPair.d.ts +19 -0
- package/lib/typescript/dhKeyPair.d.ts.map +1 -0
- package/lib/typescript/diffie-hellman.d.ts +18 -0
- package/lib/typescript/diffie-hellman.d.ts.map +1 -0
- package/lib/typescript/dsa.d.ts +19 -0
- package/lib/typescript/dsa.d.ts.map +1 -0
- package/lib/typescript/ec.d.ts +24 -0
- package/lib/typescript/ec.d.ts.map +1 -0
- package/lib/typescript/ecdh.d.ts +19 -0
- package/lib/typescript/ecdh.d.ts.map +1 -0
- package/lib/typescript/ed.d.ts +47 -0
- package/lib/typescript/ed.d.ts.map +1 -0
- package/lib/typescript/expo-plugin/@types.d.ts +8 -0
- package/lib/typescript/expo-plugin/@types.d.ts.map +1 -0
- package/lib/typescript/expo-plugin/withRNQC.d.ts +4 -0
- package/lib/typescript/expo-plugin/withRNQC.d.ts.map +1 -0
- package/lib/typescript/expo-plugin/withSodiumAndroid.d.ts +4 -0
- package/lib/typescript/expo-plugin/withSodiumAndroid.d.ts.map +1 -0
- package/lib/typescript/expo-plugin/withSodiumIos.d.ts +4 -0
- package/lib/typescript/expo-plugin/withSodiumIos.d.ts.map +1 -0
- package/lib/typescript/expo-plugin/withXCode.d.ts +23 -0
- package/lib/typescript/expo-plugin/withXCode.d.ts.map +1 -0
- package/lib/typescript/hash.d.ts +126 -0
- package/lib/typescript/hash.d.ts.map +1 -0
- package/lib/typescript/hkdf.d.ts +26 -0
- package/lib/typescript/hkdf.d.ts.map +1 -0
- package/lib/typescript/hmac.d.ts +66 -0
- package/lib/typescript/hmac.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +240 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/keys/classes.d.ts +95 -0
- package/lib/typescript/keys/classes.d.ts.map +1 -0
- package/lib/typescript/keys/generateKeyPair.d.ts +17 -0
- package/lib/typescript/keys/generateKeyPair.d.ts.map +1 -0
- package/lib/typescript/keys/index.d.ts +26 -0
- package/lib/typescript/keys/index.d.ts.map +1 -0
- package/lib/typescript/keys/publicCipher.d.ts +23 -0
- package/lib/typescript/keys/publicCipher.d.ts.map +1 -0
- package/lib/typescript/keys/signVerify.d.ts +35 -0
- package/lib/typescript/keys/signVerify.d.ts.map +1 -0
- package/lib/typescript/keys/utils.d.ts +51 -0
- package/lib/typescript/keys/utils.d.ts.map +1 -0
- package/lib/typescript/mldsa.d.ts +18 -0
- package/lib/typescript/mldsa.d.ts.map +1 -0
- package/lib/typescript/mlkem.d.ts +30 -0
- package/lib/typescript/mlkem.d.ts.map +1 -0
- package/lib/typescript/pbkdf2.d.ts +12 -0
- package/lib/typescript/pbkdf2.d.ts.map +1 -0
- package/lib/typescript/prime.d.ts +19 -0
- package/lib/typescript/prime.d.ts.map +1 -0
- package/lib/typescript/random.d.ts +31 -0
- package/lib/typescript/random.d.ts.map +1 -0
- package/lib/typescript/rsa.d.ts +20 -0
- package/lib/typescript/rsa.d.ts.map +1 -0
- package/lib/typescript/scrypt.d.ts +18 -0
- package/lib/typescript/scrypt.d.ts.map +1 -0
- package/lib/typescript/slhdsa.d.ts +19 -0
- package/lib/typescript/slhdsa.d.ts.map +1 -0
- package/lib/typescript/specs/argon2.nitro.d.ts +9 -0
- package/lib/typescript/specs/argon2.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/blake3.nitro.d.ts +15 -0
- package/lib/typescript/specs/blake3.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/certificate.nitro.d.ts +10 -0
- package/lib/typescript/specs/certificate.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/cipher.nitro.d.ts +38 -0
- package/lib/typescript/specs/cipher.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/dhKeyPair.nitro.d.ts +14 -0
- package/lib/typescript/specs/dhKeyPair.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/diffie-hellman.nitro.d.ts +18 -0
- package/lib/typescript/specs/diffie-hellman.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/dsaKeyPair.nitro.d.ts +13 -0
- package/lib/typescript/specs/dsaKeyPair.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/ecKeyPair.nitro.d.ts +21 -0
- package/lib/typescript/specs/ecKeyPair.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/ecdh.nitro.d.ts +15 -0
- package/lib/typescript/specs/ecdh.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/edKeyPair.nitro.d.ts +17 -0
- package/lib/typescript/specs/edKeyPair.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/hash.nitro.d.ts +13 -0
- package/lib/typescript/specs/hash.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/hkdf.nitro.d.ts +10 -0
- package/lib/typescript/specs/hkdf.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/hmac.nitro.d.ts +10 -0
- package/lib/typescript/specs/hmac.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/keyObjectHandle.nitro.d.ts +27 -0
- package/lib/typescript/specs/keyObjectHandle.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/kmac.nitro.d.ts +10 -0
- package/lib/typescript/specs/kmac.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/mlDsaKeyPair.nitro.d.ts +16 -0
- package/lib/typescript/specs/mlDsaKeyPair.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/mlKemKeyPair.nitro.d.ts +18 -0
- package/lib/typescript/specs/mlKemKeyPair.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/pbkdf2.nitro.d.ts +9 -0
- package/lib/typescript/specs/pbkdf2.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/prime.nitro.d.ts +11 -0
- package/lib/typescript/specs/prime.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/random.nitro.d.ts +9 -0
- package/lib/typescript/specs/random.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/rsaCipher.nitro.d.ts +54 -0
- package/lib/typescript/specs/rsaCipher.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/rsaKeyPair.nitro.d.ts +20 -0
- package/lib/typescript/specs/rsaKeyPair.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/scrypt.nitro.d.ts +9 -0
- package/lib/typescript/specs/scrypt.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/sign.nitro.d.ts +19 -0
- package/lib/typescript/specs/sign.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/slhDsaKeyPair.nitro.d.ts +16 -0
- package/lib/typescript/specs/slhDsaKeyPair.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/turboshake.nitro.d.ts +11 -0
- package/lib/typescript/specs/turboshake.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/utils.nitro.d.ts +8 -0
- package/lib/typescript/specs/utils.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/x509certificate.nitro.d.ts +34 -0
- package/lib/typescript/specs/x509certificate.nitro.d.ts.map +1 -0
- package/lib/typescript/subtle.d.ts +33 -0
- package/lib/typescript/subtle.d.ts.map +1 -0
- package/lib/typescript/utils/cipher.d.ts +19 -0
- package/lib/typescript/utils/cipher.d.ts.map +1 -0
- package/lib/typescript/utils/conversion.d.ts +36 -0
- package/lib/typescript/utils/conversion.d.ts.map +1 -0
- package/lib/typescript/utils/errors.d.ts +19 -0
- package/lib/typescript/utils/errors.d.ts.map +1 -0
- package/lib/typescript/utils/hashnames.d.ts +13 -0
- package/lib/typescript/utils/hashnames.d.ts.map +1 -0
- package/lib/typescript/utils/index.d.ts +8 -0
- package/lib/typescript/utils/index.d.ts.map +1 -0
- package/lib/typescript/utils/noble.d.ts +19 -0
- package/lib/typescript/utils/noble.d.ts.map +1 -0
- package/lib/typescript/utils/timingSafeEqual.d.ts +3 -0
- package/lib/typescript/utils/timingSafeEqual.d.ts.map +1 -0
- package/lib/typescript/utils/types.d.ts +314 -0
- package/lib/typescript/utils/types.d.ts.map +1 -0
- package/lib/typescript/utils/validation.d.ts +15 -0
- package/lib/typescript/utils/validation.d.ts.map +1 -0
- package/lib/typescript/x509certificate.d.ts +64 -0
- package/lib/typescript/x509certificate.d.ts.map +1 -0
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/QuickCrypto+autolinking.cmake +110 -0
- package/nitrogen/generated/android/QuickCrypto+autolinking.gradle +27 -0
- package/nitrogen/generated/android/QuickCryptoOnLoad.cpp +334 -0
- package/nitrogen/generated/android/QuickCryptoOnLoad.hpp +25 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/crypto/QuickCryptoOnLoad.kt +35 -0
- package/nitrogen/generated/ios/QuickCrypto+autolinking.rb +60 -0
- package/nitrogen/generated/ios/QuickCrypto-Swift-Cxx-Bridge.cpp +17 -0
- package/nitrogen/generated/ios/QuickCrypto-Swift-Cxx-Bridge.hpp +27 -0
- package/nitrogen/generated/ios/QuickCrypto-Swift-Cxx-Umbrella.hpp +38 -0
- package/nitrogen/generated/ios/QuickCryptoAutolinking.mm +325 -0
- package/nitrogen/generated/ios/QuickCryptoAutolinking.swift +16 -0
- package/nitrogen/generated/shared/c++/AsymmetricKeyType.hpp +176 -0
- package/nitrogen/generated/shared/c++/CipherArgs.hpp +101 -0
- package/nitrogen/generated/shared/c++/CipherInfo.hpp +104 -0
- package/nitrogen/generated/shared/c++/HkdfMode.hpp +80 -0
- package/nitrogen/generated/shared/c++/HybridArgon2Spec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridArgon2Spec.hpp +66 -0
- package/nitrogen/generated/shared/c++/HybridBlake3Spec.cpp +28 -0
- package/nitrogen/generated/shared/c++/HybridBlake3Spec.hpp +74 -0
- package/nitrogen/generated/shared/c++/HybridCertificateSpec.cpp +23 -0
- package/nitrogen/generated/shared/c++/HybridCertificateSpec.hpp +64 -0
- package/nitrogen/generated/shared/c++/HybridCipherFactorySpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridCipherFactorySpec.hpp +67 -0
- package/nitrogen/generated/shared/c++/HybridCipherSpec.cpp +29 -0
- package/nitrogen/generated/shared/c++/HybridCipherSpec.hpp +78 -0
- package/nitrogen/generated/shared/c++/HybridDhKeyPairSpec.cpp +27 -0
- package/nitrogen/generated/shared/c++/HybridDhKeyPairSpec.hpp +69 -0
- package/nitrogen/generated/shared/c++/HybridDiffieHellmanSpec.cpp +31 -0
- package/nitrogen/generated/shared/c++/HybridDiffieHellmanSpec.hpp +72 -0
- package/nitrogen/generated/shared/c++/HybridDsaKeyPairSpec.cpp +26 -0
- package/nitrogen/generated/shared/c++/HybridDsaKeyPairSpec.hpp +68 -0
- package/nitrogen/generated/shared/c++/HybridECDHSpec.cpp +28 -0
- package/nitrogen/generated/shared/c++/HybridECDHSpec.hpp +70 -0
- package/nitrogen/generated/shared/c++/HybridEcKeyPairSpec.cpp +30 -0
- package/nitrogen/generated/shared/c++/HybridEcKeyPairSpec.hpp +76 -0
- package/nitrogen/generated/shared/c++/HybridEdKeyPairSpec.cpp +30 -0
- package/nitrogen/generated/shared/c++/HybridEdKeyPairSpec.hpp +74 -0
- package/nitrogen/generated/shared/c++/HybridHashSpec.cpp +26 -0
- package/nitrogen/generated/shared/c++/HybridHashSpec.hpp +74 -0
- package/nitrogen/generated/shared/c++/HybridHkdfSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridHkdfSpec.hpp +67 -0
- package/nitrogen/generated/shared/c++/HybridHmacSpec.cpp +23 -0
- package/nitrogen/generated/shared/c++/HybridHmacSpec.hpp +66 -0
- package/nitrogen/generated/shared/c++/HybridKeyObjectHandleSpec.cpp +39 -0
- package/nitrogen/generated/shared/c++/HybridKeyObjectHandleSpec.hpp +107 -0
- package/nitrogen/generated/shared/c++/HybridKmacSpec.cpp +23 -0
- package/nitrogen/generated/shared/c++/HybridKmacSpec.hpp +66 -0
- package/nitrogen/generated/shared/c++/HybridMlDsaKeyPairSpec.cpp +29 -0
- package/nitrogen/generated/shared/c++/HybridMlDsaKeyPairSpec.hpp +72 -0
- package/nitrogen/generated/shared/c++/HybridMlKemKeyPairSpec.cpp +31 -0
- package/nitrogen/generated/shared/c++/HybridMlKemKeyPairSpec.hpp +74 -0
- package/nitrogen/generated/shared/c++/HybridPbkdf2Spec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridPbkdf2Spec.hpp +65 -0
- package/nitrogen/generated/shared/c++/HybridPrimeSpec.cpp +24 -0
- package/nitrogen/generated/shared/c++/HybridPrimeSpec.hpp +67 -0
- package/nitrogen/generated/shared/c++/HybridRandomSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridRandomSpec.hpp +64 -0
- package/nitrogen/generated/shared/c++/HybridRsaCipherSpec.cpp +25 -0
- package/nitrogen/generated/shared/c++/HybridRsaCipherSpec.hpp +71 -0
- package/nitrogen/generated/shared/c++/HybridRsaKeyPairSpec.cpp +29 -0
- package/nitrogen/generated/shared/c++/HybridRsaKeyPairSpec.hpp +75 -0
- package/nitrogen/generated/shared/c++/HybridScryptSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridScryptSpec.hpp +64 -0
- package/nitrogen/generated/shared/c++/HybridSignHandleSpec.cpp +23 -0
- package/nitrogen/generated/shared/c++/HybridSignHandleSpec.hpp +69 -0
- package/nitrogen/generated/shared/c++/HybridSlhDsaKeyPairSpec.cpp +29 -0
- package/nitrogen/generated/shared/c++/HybridSlhDsaKeyPairSpec.hpp +72 -0
- package/nitrogen/generated/shared/c++/HybridTurboShakeSpec.cpp +22 -0
- package/nitrogen/generated/shared/c++/HybridTurboShakeSpec.hpp +70 -0
- package/nitrogen/generated/shared/c++/HybridUtilsSpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridUtilsSpec.hpp +62 -0
- package/nitrogen/generated/shared/c++/HybridVerifyHandleSpec.cpp +23 -0
- package/nitrogen/generated/shared/c++/HybridVerifyHandleSpec.hpp +69 -0
- package/nitrogen/generated/shared/c++/HybridX509CertificateHandleSpec.cpp +46 -0
- package/nitrogen/generated/shared/c++/HybridX509CertificateHandleSpec.hpp +96 -0
- package/nitrogen/generated/shared/c++/JWK.hpp +185 -0
- package/nitrogen/generated/shared/c++/JWKkty.hpp +92 -0
- package/nitrogen/generated/shared/c++/JWKuse.hpp +76 -0
- package/nitrogen/generated/shared/c++/KFormatType.hpp +63 -0
- package/nitrogen/generated/shared/c++/KangarooTwelveVariant.hpp +76 -0
- package/nitrogen/generated/shared/c++/KeyDetail.hpp +108 -0
- package/nitrogen/generated/shared/c++/KeyEncoding.hpp +64 -0
- package/nitrogen/generated/shared/c++/KeyObject.hpp +83 -0
- package/nitrogen/generated/shared/c++/KeyType.hpp +63 -0
- package/nitrogen/generated/shared/c++/KeyUsage.hpp +116 -0
- package/nitrogen/generated/shared/c++/NamedCurve.hpp +80 -0
- package/nitrogen/generated/shared/c++/TurboShakeVariant.hpp +76 -0
- package/ohos/binding.gyp +33 -0
- package/ohos/build/Release/quick_crypto.node +0 -0
- package/ohos/quick_crypto_napi.cpp +1316 -0
- package/package.json +158 -4
- package/src/argon2.ts +161 -0
- package/src/blake3.ts +124 -0
- package/src/certificate.ts +41 -0
- package/src/cipher.ts +497 -0
- package/src/constants.ts +32 -0
- package/src/dh-groups.ts +27 -0
- package/src/dhKeyPair.ts +164 -0
- package/src/diffie-hellman.ts +195 -0
- package/src/dsa.ts +146 -0
- package/src/ec.ts +580 -0
- package/src/ecdh.ts +132 -0
- package/src/ed.ts +605 -0
- package/src/expo-plugin/@types.ts +7 -0
- package/src/expo-plugin/withRNQC.ts +23 -0
- package/src/expo-plugin/withSodiumAndroid.ts +24 -0
- package/src/expo-plugin/withSodiumIos.ts +25 -0
- package/src/expo-plugin/withXCode.ts +134 -0
- package/src/hash.ts +433 -0
- package/src/hkdf.ts +327 -0
- package/src/hmac.ts +150 -0
- package/src/index.ts +126 -0
- package/src/keys/classes.ts +369 -0
- package/src/keys/generateKeyPair.ts +358 -0
- package/src/keys/index.ts +383 -0
- package/src/keys/publicCipher.ts +256 -0
- package/src/keys/signVerify.ts +329 -0
- package/src/keys/utils.ts +263 -0
- package/src/mldsa.ts +125 -0
- package/src/mlkem.ts +350 -0
- package/src/pbkdf2.ts +183 -0
- package/src/prime.ts +134 -0
- package/src/random.ts +427 -0
- package/src/rsa.ts +333 -0
- package/src/scrypt.ts +201 -0
- package/src/slhdsa.ts +146 -0
- package/src/specs/argon2.nitro.ts +29 -0
- package/src/specs/blake3.nitro.ts +12 -0
- package/src/specs/certificate.nitro.ts +8 -0
- package/src/specs/cipher.nitro.ts +39 -0
- package/src/specs/dhKeyPair.nitro.ts +14 -0
- package/src/specs/diffie-hellman.nitro.ts +16 -0
- package/src/specs/dsaKeyPair.nitro.ts +13 -0
- package/src/specs/ecKeyPair.nitro.ts +40 -0
- package/src/specs/ecdh.nitro.ts +12 -0
- package/src/specs/edKeyPair.nitro.ts +43 -0
- package/src/specs/hash.nitro.ts +10 -0
- package/src/specs/hkdf.nitro.ts +25 -0
- package/src/specs/hmac.nitro.ts +7 -0
- package/src/specs/keyObjectHandle.nitro.ts +56 -0
- package/src/specs/kmac.nitro.ts +12 -0
- package/src/specs/mlDsaKeyPair.nitro.ts +29 -0
- package/src/specs/mlKemKeyPair.nitro.ts +32 -0
- package/src/specs/pbkdf2.nitro.ts +18 -0
- package/src/specs/prime.nitro.ts +18 -0
- package/src/specs/random.nitro.ts +14 -0
- package/src/specs/rsaCipher.nitro.ts +82 -0
- package/src/specs/rsaKeyPair.nitro.ts +33 -0
- package/src/specs/scrypt.nitro.ts +23 -0
- package/src/specs/sign.nitro.ts +31 -0
- package/src/specs/slhDsaKeyPair.nitro.ts +29 -0
- package/src/specs/turboshake.nitro.ts +21 -0
- package/src/specs/utils.nitro.ts +5 -0
- package/src/specs/x509certificate.nitro.ts +38 -0
- package/src/subtle.ts +4545 -0
- package/src/utils/cipher.ts +82 -0
- package/src/utils/conversion.ts +285 -0
- package/src/utils/errors.ts +83 -0
- package/src/utils/hashnames.ts +129 -0
- package/src/utils/index.ts +7 -0
- package/src/utils/noble.ts +85 -0
- package/src/utils/timingSafeEqual.ts +28 -0
- package/src/utils/types.ts +617 -0
- package/src/utils/validation.ts +199 -0
- package/src/x509certificate.ts +276 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
2
|
+
import type { BinaryLike } from './utils';
|
|
3
|
+
import type { CryptoKey } from './keys';
|
|
4
|
+
type KeyMaterial = BinaryLike;
|
|
5
|
+
type Salt = BinaryLike;
|
|
6
|
+
type Info = BinaryLike;
|
|
7
|
+
export interface HkdfAlgorithm {
|
|
8
|
+
name: string;
|
|
9
|
+
hash: string | {
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
salt: BinaryLike;
|
|
13
|
+
info: BinaryLike;
|
|
14
|
+
}
|
|
15
|
+
export interface HkdfCallback {
|
|
16
|
+
(err: Error | null, derivedKey?: Buffer): void;
|
|
17
|
+
}
|
|
18
|
+
export declare function hkdf(digest: string, key: KeyMaterial, salt: Salt, info: Info, keylen: number, callback: HkdfCallback): void;
|
|
19
|
+
export declare function hkdfSync(digest: string, key: KeyMaterial, salt: Salt, info: Info, keylen: number): Buffer;
|
|
20
|
+
export declare function hkdfExtractSync(digest: string, ikm: KeyMaterial, salt?: Salt): Buffer;
|
|
21
|
+
export declare function hkdfExtract(digest: string, ikm: KeyMaterial, salt: Salt, callback: HkdfCallback): void;
|
|
22
|
+
export declare function hkdfExpandSync(digest: string, prk: KeyMaterial, info: Info, keylen: number): Buffer;
|
|
23
|
+
export declare function hkdfExpand(digest: string, prk: KeyMaterial, info: Info, keylen: number, callback: HkdfCallback): void;
|
|
24
|
+
export declare function hkdfDeriveBits(algorithm: HkdfAlgorithm, baseKey: CryptoKey, length: number): ArrayBuffer;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=hkdf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hkdf.d.ts","sourceRoot":"","sources":["../../src/hkdf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAIxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExC,KAAK,WAAW,GAAG,UAAU,CAAC;AAC9B,KAAK,IAAI,GAAG,UAAU,CAAC;AACvB,KAAK,IAAI,GAAG,UAAU,CAAC;AAEvB,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAChC,IAAI,EAAE,UAAU,CAAC;IACjB,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,MAAM,WAAW,YAAY;IAC3B,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChD;AA2ED,wBAAgB,IAAI,CAClB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,YAAY,GACrB,IAAI,CAgCN;AAED,wBAAgB,QAAQ,CACtB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,MAAM,CAmBR;AAID,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,WAAW,EAChB,IAAI,GAAE,IAAwB,GAC7B,MAAM,CAgBR;AAID,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,YAAY,GACrB,IAAI,CAyBN;AAID,wBAAgB,cAAc,CAC5B,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,GACb,MAAM,CAuBR;AAGD,wBAAgB,UAAU,CACxB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,YAAY,GACrB,IAAI,CAgCN;AAED,wBAAgB,cAAc,CAC5B,SAAS,EAAE,aAAa,EACxB,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,MAAM,GACb,WAAW,CA4Bb"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
2
|
+
import { Stream } from 'readable-stream';
|
|
3
|
+
import type { TransformOptions } from 'readable-stream';
|
|
4
|
+
import type { BinaryLike, Encoding } from './utils/types';
|
|
5
|
+
declare class Hmac extends Stream.Transform {
|
|
6
|
+
private algorithm;
|
|
7
|
+
private key;
|
|
8
|
+
private native;
|
|
9
|
+
private validate;
|
|
10
|
+
/**
|
|
11
|
+
* @internal use `createHmac()` instead
|
|
12
|
+
*/
|
|
13
|
+
private constructor();
|
|
14
|
+
/**
|
|
15
|
+
* Updates the `Hmac` content with the given `data`, the encoding of which is given in `inputEncoding`.
|
|
16
|
+
* If `encoding` is not provided, and the `data` is a string, an encoding of `'utf8'` is enforced.
|
|
17
|
+
* If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
|
|
18
|
+
*
|
|
19
|
+
* This can be called many times with new data as it is streamed.
|
|
20
|
+
* @since v1.0.0
|
|
21
|
+
* @param inputEncoding The `encoding` of the `data` string.
|
|
22
|
+
*/
|
|
23
|
+
update(data: BinaryLike): Hmac;
|
|
24
|
+
update(data: BinaryLike, inputEncoding: Encoding): Hmac;
|
|
25
|
+
/**
|
|
26
|
+
* Calculates the HMAC digest of all of the data passed using `hmac.update()`.
|
|
27
|
+
* If `encoding` is provided a string is returned; otherwise a `Buffer` is returned;
|
|
28
|
+
*
|
|
29
|
+
* The `Hmac` object can not be used again after `hmac.digest()` has been
|
|
30
|
+
* called. Multiple calls to `hmac.digest()` will result in an error being thrown.
|
|
31
|
+
* @since v1.0.0
|
|
32
|
+
* @param encoding The `encoding` of the return value.
|
|
33
|
+
*/
|
|
34
|
+
digest(): Buffer;
|
|
35
|
+
digest(encoding: Encoding): string;
|
|
36
|
+
_transform(chunk: BinaryLike, encoding: BufferEncoding, callback: (err?: Error | null) => void): void;
|
|
37
|
+
_flush(callback: (err?: Error | null) => void): void;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Creates and returns an `Hmac` object that uses the given `algorithm` and `key`.
|
|
41
|
+
* Optional `options` argument controls stream behavior.
|
|
42
|
+
*
|
|
43
|
+
* The `algorithm` is dependent on the available algorithms supported by the
|
|
44
|
+
* version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
|
|
45
|
+
* On recent releases of OpenSSL, `openssl list -digest-algorithms` will
|
|
46
|
+
* display the available digest algorithms.
|
|
47
|
+
*
|
|
48
|
+
* Example: generating the sha256 HMAC of a file
|
|
49
|
+
*
|
|
50
|
+
* ```js
|
|
51
|
+
* import crypto from 'react-native-quick-crypto';
|
|
52
|
+
*
|
|
53
|
+
* const hmac = crypto.createHmac('sha256', 'secret-key');
|
|
54
|
+
* hmac.update('message to hash');
|
|
55
|
+
* const digest = hmac.digest('hex');
|
|
56
|
+
* console.log(digest); // prints HMAC digest in hexadecimal format
|
|
57
|
+
* ```
|
|
58
|
+
* @since v1.0.0
|
|
59
|
+
* @param options `stream.transform` options
|
|
60
|
+
*/
|
|
61
|
+
export declare function createHmac(algorithm: string, key: BinaryLike, options?: TransformOptions): Hmac;
|
|
62
|
+
export declare const hmacExports: {
|
|
63
|
+
createHmac: typeof createHmac;
|
|
64
|
+
};
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=hmac.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hmac.d.ts","sourceRoot":"","sources":["../../src/hmac.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAS1D,cAAM,IAAK,SAAQ,MAAM,CAAC,SAAS;IACjC,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,GAAG,CAAa;IACxB,OAAO,CAAC,MAAM,CAAa;IAE3B,OAAO,CAAC,QAAQ;IAOhB;;OAEG;IACH,OAAO;IAYP;;;;;;;;OAQG;IACH,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAC9B,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,GAAG,IAAI;IAevD;;;;;;;;OAQG;IACH,MAAM,IAAI,MAAM;IAChB,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM;IAclC,UAAU,CACR,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,cAAc,EACxB,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI;IASxC,MAAM,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,GAAG,IAAI,KAAK,IAAI;CAQ9C;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,UAAU,CACxB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,UAAU,EACf,OAAO,CAAC,EAAE,gBAAgB,GACzB,IAAI,CAON;AAED,eAAO,MAAM,WAAW;;CAEvB,CAAC"}
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
2
|
+
declare global {
|
|
3
|
+
var base64ToArrayBuffer: (s: string, removeLinebreaks?: boolean) => ArrayBuffer;
|
|
4
|
+
var base64FromArrayBuffer: (b: ArrayBuffer, urlSafe?: boolean) => string;
|
|
5
|
+
}
|
|
6
|
+
import * as argon2Module from './argon2';
|
|
7
|
+
import * as keys from './keys';
|
|
8
|
+
import * as blake3 from './blake3';
|
|
9
|
+
import * as cipher from './cipher';
|
|
10
|
+
import * as ed from './ed';
|
|
11
|
+
import * as hkdf from './hkdf';
|
|
12
|
+
import * as prime from './prime';
|
|
13
|
+
import * as scrypt from './scrypt';
|
|
14
|
+
import * as random from './random';
|
|
15
|
+
import * as ecdh from './ecdh';
|
|
16
|
+
import * as dh from './diffie-hellman';
|
|
17
|
+
import * as mlkem from './mlkem';
|
|
18
|
+
import { Certificate } from './certificate';
|
|
19
|
+
import { X509Certificate } from './x509certificate';
|
|
20
|
+
import { getCurves } from './ec';
|
|
21
|
+
import * as utils from './utils';
|
|
22
|
+
import * as subtle from './subtle';
|
|
23
|
+
/**
|
|
24
|
+
* Loosely matches Node.js {crypto} with some unimplemented functionality.
|
|
25
|
+
* See `docs/implementation-coverage.md` for status.
|
|
26
|
+
*/
|
|
27
|
+
declare const QuickCrypto: {
|
|
28
|
+
Certificate: typeof Certificate;
|
|
29
|
+
X509Certificate: typeof X509Certificate;
|
|
30
|
+
getCurves: typeof getCurves;
|
|
31
|
+
constants: {
|
|
32
|
+
readonly RSA_PKCS1_PADDING: 1;
|
|
33
|
+
readonly RSA_NO_PADDING: 3;
|
|
34
|
+
readonly RSA_PKCS1_OAEP_PADDING: 4;
|
|
35
|
+
readonly RSA_X931_PADDING: 5;
|
|
36
|
+
readonly RSA_PKCS1_PSS_PADDING: 6;
|
|
37
|
+
readonly RSA_PSS_SALTLEN_DIGEST: -1;
|
|
38
|
+
readonly RSA_PSS_SALTLEN_MAX_SIGN: -2;
|
|
39
|
+
readonly RSA_PSS_SALTLEN_AUTO: -2;
|
|
40
|
+
readonly POINT_CONVERSION_COMPRESSED: 2;
|
|
41
|
+
readonly POINT_CONVERSION_UNCOMPRESSED: 4;
|
|
42
|
+
readonly POINT_CONVERSION_HYBRID: 6;
|
|
43
|
+
readonly DH_CHECK_P_NOT_PRIME: 1;
|
|
44
|
+
readonly DH_CHECK_P_NOT_SAFE_PRIME: 2;
|
|
45
|
+
readonly DH_UNABLE_TO_CHECK_GENERATOR: 4;
|
|
46
|
+
readonly DH_NOT_SUITABLE_GENERATOR: 8;
|
|
47
|
+
readonly OPENSSL_VERSION_NUMBER: 805306368;
|
|
48
|
+
};
|
|
49
|
+
Buffer: typeof Buffer;
|
|
50
|
+
isCryptoKeyPair(result: keys.CryptoKey | utils.CryptoKeyPair): result is utils.CryptoKeyPair;
|
|
51
|
+
PQC_SEEDLESS_PKCS8_LENGTHS: Readonly<Record<string, number>>;
|
|
52
|
+
Subtle: typeof subtle.Subtle;
|
|
53
|
+
subtle: subtle.Subtle;
|
|
54
|
+
rejectSharedArrayBuffer(buf: unknown): void;
|
|
55
|
+
toArrayBuffer(buf: Buffer | import("safe-buffer").Buffer | ArrayBufferView): ArrayBuffer;
|
|
56
|
+
bufferLikeToArrayBuffer(buf: utils.BufferLike): ArrayBuffer;
|
|
57
|
+
binaryLikeToArrayBuffer(input: utils.BinaryLikeNode, encoding?: string): ArrayBuffer;
|
|
58
|
+
ab2str(buf: ArrayBuffer, encoding?: string, start?: number, end?: number): string;
|
|
59
|
+
bufferToString(buf: ArrayBuffer, encoding?: string, start?: number, end?: number): string;
|
|
60
|
+
stringToBuffer(str: string, encoding?: string): ArrayBuffer;
|
|
61
|
+
abvToArrayBuffer: (buf: utils.ABV) => ArrayBuffer;
|
|
62
|
+
kEmptyObject: any;
|
|
63
|
+
ensureBytes(title: string, hex: utils.Hex, expectedLength?: number): Uint8Array;
|
|
64
|
+
isBytes(a: unknown): a is Uint8Array;
|
|
65
|
+
hexToBytes(hex: string): Uint8Array;
|
|
66
|
+
lazyDOMException(message: string, domName: string | {
|
|
67
|
+
name: string;
|
|
68
|
+
cause: unknown;
|
|
69
|
+
}): Error;
|
|
70
|
+
QuotaExceededError: typeof utils.QuotaExceededError;
|
|
71
|
+
normalizeHashName(algo: string | utils.HashAlgorithm | {
|
|
72
|
+
name: string;
|
|
73
|
+
} | undefined, context?: utils.HashContext): string;
|
|
74
|
+
HashContext: typeof utils.HashContext;
|
|
75
|
+
timingSafeEqual(a: utils.ABV, b: utils.ABV): boolean;
|
|
76
|
+
KFormatType: typeof utils.KFormatType;
|
|
77
|
+
KeyType: typeof utils.KeyType;
|
|
78
|
+
KeyEncoding: typeof utils.KeyEncoding;
|
|
79
|
+
KeyFormat: typeof utils.KeyFormat;
|
|
80
|
+
kNamedCurveAliases: {
|
|
81
|
+
readonly 'P-256': "prime256v1";
|
|
82
|
+
readonly 'P-384': "secp384r1";
|
|
83
|
+
readonly 'P-521': "secp521r1";
|
|
84
|
+
};
|
|
85
|
+
KeyVariant: typeof utils.KeyVariant;
|
|
86
|
+
validateFunction(f: unknown): boolean;
|
|
87
|
+
isStringOrBuffer(val: unknown): val is string | ArrayBuffer;
|
|
88
|
+
validateObject<T>(value: unknown, name: string, options?: {
|
|
89
|
+
allowArray: boolean;
|
|
90
|
+
allowFunction: boolean;
|
|
91
|
+
nullable: boolean;
|
|
92
|
+
} | null): value is T;
|
|
93
|
+
getSortedUsages(usages: utils.KeyUsage[]): utils.KeyUsage[];
|
|
94
|
+
validateJwkStructure(jwk: utils.JWK, extractable: boolean, keyUsages: utils.KeyUsage[], expectedUse: "sig" | "enc"): void;
|
|
95
|
+
hasAnyNotIn(set: string[], checks: string[]): boolean;
|
|
96
|
+
validateMaxBufferLength: (data: utils.BinaryLike | utils.BufferLike, name: string) => void;
|
|
97
|
+
getUsagesUnion: (usageSet: utils.KeyUsage[], // @ts-expect-error subtle isn't fully implemented and Cryptokey is missing
|
|
98
|
+
...usages: utils.KeyUsage[]) => utils.KeyUsage[];
|
|
99
|
+
validateKeyOps: (keyOps: utils.KeyUsage[] | undefined, usagesSet: utils.KeyUsage[]) => void;
|
|
100
|
+
setDefaultEncoding(encoding: utils.Encoding): void;
|
|
101
|
+
getDefaultEncoding(): utils.Encoding;
|
|
102
|
+
normalizeEncoding(enc: string): "ascii" | "utf8" | "utf16le" | "base64" | "latin1" | "hex" | undefined;
|
|
103
|
+
validateEncoding(data: string, encoding: string): void;
|
|
104
|
+
getUIntOption(options: Readonly<Record<string, unknown>> | undefined, key: string): number | undefined;
|
|
105
|
+
encapsulate(key: keys.KeyObject | keys.CryptoKey | utils.BinaryLike | mlkem.KeyInputObject, callback?: (err: Error | null, result?: utils.EncapsulateResult) => void): utils.EncapsulateResult | void;
|
|
106
|
+
decapsulate(key: keys.KeyObject | keys.CryptoKey | utils.BinaryLike | mlkem.KeyInputObject, ciphertext: utils.BinaryLike, callback?: (err: Error | null, result?: ArrayBuffer) => void): ArrayBuffer | void;
|
|
107
|
+
mlkem_generateKeyPairWebCrypto(variant: mlkem.MlKemVariant, extractable: boolean, keyUsages: utils.KeyUsage[]): Promise<utils.CryptoKeyPair>;
|
|
108
|
+
MlKem: typeof mlkem.MlKem;
|
|
109
|
+
createDiffieHellman(primeOrSize: number | string | Buffer, primeEncodingOrGenerator?: string | number | Buffer, generator?: number | string | Buffer, _generatorEncoding?: string): dh.DiffieHellman;
|
|
110
|
+
getDiffieHellman(groupName: string): dh.DiffieHellman;
|
|
111
|
+
DiffieHellman: typeof dh.DiffieHellman;
|
|
112
|
+
createDiffieHellmanGroup: typeof dh.getDiffieHellman;
|
|
113
|
+
createECDH(curveName: string): ecdh.ECDH;
|
|
114
|
+
ECDH: typeof ecdh.ECDH;
|
|
115
|
+
randomFill<T extends utils.ABV>(buffer: T, callback: utils.RandomCallback<T>): void;
|
|
116
|
+
randomFill<T extends utils.ABV>(buffer: T, offset: number, callback: utils.RandomCallback<T>): void;
|
|
117
|
+
randomFill<T extends utils.ABV>(buffer: T, offset: number, size: number, callback: utils.RandomCallback<T>): void;
|
|
118
|
+
randomFillSync<T extends utils.ABV>(buffer: T, offset?: number, size?: number): T;
|
|
119
|
+
randomBytes(size: number): Buffer;
|
|
120
|
+
randomBytes(size: number, callback: (err: Error | null, buf?: Buffer) => void): void;
|
|
121
|
+
randomInt(max: number, callback: (err: Error | null, value: number) => void): void;
|
|
122
|
+
randomInt(max: number): number;
|
|
123
|
+
randomInt(min: number, max: number, callback: (err: Error | null, value: number) => void): void;
|
|
124
|
+
randomInt(min: number, max: number): number;
|
|
125
|
+
getRandomValues(data: random.RandomTypedArrays): random.RandomTypedArrays;
|
|
126
|
+
randomUUID(options?: random.RandomUUIDOptions): string;
|
|
127
|
+
randomUUIDv7(options?: random.RandomUUIDOptions): string;
|
|
128
|
+
rng: typeof random.randomBytes;
|
|
129
|
+
pseudoRandomBytes: typeof random.randomBytes;
|
|
130
|
+
prng: typeof random.randomBytes;
|
|
131
|
+
scrypt(password: utils.BinaryLike, salt: utils.BinaryLike, keylen: number, options?: scrypt.ScryptOptions | ((err: Error | null, derivedKey?: Buffer) => void), callback?: (err: Error | null, derivedKey?: Buffer) => void): void;
|
|
132
|
+
scryptSync(password: utils.BinaryLike, salt: utils.BinaryLike, keylen: number, options?: scrypt.ScryptOptions): Buffer;
|
|
133
|
+
generatePrimeSync(size: number, options?: prime.GeneratePrimeOptions): Buffer | bigint;
|
|
134
|
+
generatePrime(size: number, options: prime.GeneratePrimeOptions | ((err: Error | null, prime: Buffer | bigint) => void), callback?: (err: Error | null, prime: Buffer | bigint) => void): void;
|
|
135
|
+
checkPrimeSync(candidate: utils.BinaryLike | bigint, options?: prime.CheckPrimeOptions): boolean;
|
|
136
|
+
checkPrime(candidate: utils.BinaryLike | bigint, options: prime.CheckPrimeOptions | ((err: Error | null, result: boolean) => void), callback?: (err: Error | null, result: boolean) => void): void;
|
|
137
|
+
pbkdf2(password: utils.BinaryLike, salt: utils.BinaryLike, iterations: number, keylen: number, digest: string, callback: (err: Error | null, derivedKey?: Buffer) => void): void;
|
|
138
|
+
pbkdf2Sync(password: utils.BinaryLike, salt: utils.BinaryLike, iterations: number, keylen: number, digest: string): Buffer;
|
|
139
|
+
pbkdf2DeriveBits(algorithm: utils.SubtleAlgorithm, baseKey: keys.CryptoKey, length: number): Promise<ArrayBuffer>;
|
|
140
|
+
hkdf(digest: string, key: utils.BinaryLike, salt: utils.BinaryLike, info: utils.BinaryLike, keylen: number, callback: hkdf.HkdfCallback): void;
|
|
141
|
+
hkdfSync(digest: string, key: utils.BinaryLike, salt: utils.BinaryLike, info: utils.BinaryLike, keylen: number): Buffer;
|
|
142
|
+
hkdfExtractSync(digest: string, ikm: utils.BinaryLike, salt?: utils.BinaryLike): Buffer;
|
|
143
|
+
hkdfExtract(digest: string, ikm: utils.BinaryLike, salt: utils.BinaryLike, callback: hkdf.HkdfCallback): void;
|
|
144
|
+
hkdfExpandSync(digest: string, prk: utils.BinaryLike, info: utils.BinaryLike, keylen: number): Buffer;
|
|
145
|
+
hkdfExpand(digest: string, prk: utils.BinaryLike, info: utils.BinaryLike, keylen: number, callback: hkdf.HkdfCallback): void;
|
|
146
|
+
hkdfDeriveBits(algorithm: hkdf.HkdfAlgorithm, baseKey: keys.CryptoKey, length: number): ArrayBuffer;
|
|
147
|
+
createHmac: typeof import("./hmac").createHmac;
|
|
148
|
+
createHash: typeof import("./hash").createHash;
|
|
149
|
+
getHashes: typeof import("./hash").getHashes;
|
|
150
|
+
hash: typeof import("./hash").hash;
|
|
151
|
+
asyncDigest: (algorithm: utils.SubtleAlgorithm, data: utils.BufferLike) => Promise<ArrayBuffer>;
|
|
152
|
+
diffieHellman(options: utils.DiffieHellmanOptions, callback?: utils.DiffieHellmanCallback): Buffer | void;
|
|
153
|
+
ed_generateKeyPair(isAsync: boolean, type: utils.CFRGKeyPairType, encoding: utils.KeyPairGenConfig, callback: utils.GenerateKeyPairCallback | undefined): utils.GenerateKeyPairReturn | void;
|
|
154
|
+
ed_generateKeyPairWebCrypto(type: "ed25519" | "ed448", extractable: boolean, keyUsages: utils.KeyUsage[]): Promise<utils.CryptoKeyPair>;
|
|
155
|
+
x_generateKeyPairWebCrypto(type: "x25519" | "x448", extractable: boolean, keyUsages: utils.KeyUsage[]): Promise<utils.CryptoKeyPair>;
|
|
156
|
+
xDeriveBits(algorithm: utils.SubtleAlgorithm, baseKey: keys.CryptoKey, length: number | null): ArrayBuffer;
|
|
157
|
+
Ed: typeof ed.Ed;
|
|
158
|
+
getCiphers(): string[];
|
|
159
|
+
getCipherInfo(name: string, options?: {
|
|
160
|
+
keyLength?: number;
|
|
161
|
+
ivLength?: number;
|
|
162
|
+
}): cipher.CipherInfoResult | undefined;
|
|
163
|
+
createDecipheriv(algorithm: import("crypto").CipherCCMTypes, key: utils.BinaryLikeNode, iv: utils.BinaryLike, options: import("crypto").CipherCCMOptions): cipher.Decipher;
|
|
164
|
+
createDecipheriv(algorithm: import("crypto").CipherOCBTypes, key: utils.BinaryLikeNode, iv: utils.BinaryLike, options: import("crypto").CipherOCBOptions): cipher.Decipher;
|
|
165
|
+
createDecipheriv(algorithm: import("crypto").CipherGCMTypes, key: utils.BinaryLikeNode, iv: utils.BinaryLike, options?: import("crypto").CipherGCMOptions): cipher.Decipher;
|
|
166
|
+
createDecipheriv(algorithm: string, key: utils.BinaryLikeNode, iv: utils.BinaryLike, options?: import("readable-stream").TransformOptions): cipher.Decipher;
|
|
167
|
+
createCipheriv(algorithm: import("crypto").CipherCCMTypes, key: utils.BinaryLikeNode, iv: utils.BinaryLike, options: import("crypto").CipherCCMOptions): cipher.Cipher;
|
|
168
|
+
createCipheriv(algorithm: import("crypto").CipherOCBTypes, key: utils.BinaryLikeNode, iv: utils.BinaryLike, options: import("crypto").CipherOCBOptions): cipher.Cipher;
|
|
169
|
+
createCipheriv(algorithm: import("crypto").CipherGCMTypes, key: utils.BinaryLikeNode, iv: utils.BinaryLike, options?: import("crypto").CipherGCMOptions): cipher.Cipher;
|
|
170
|
+
createCipheriv(algorithm: string, key: utils.BinaryLikeNode, iv: utils.BinaryLike, options?: import("readable-stream").TransformOptions): cipher.Cipher;
|
|
171
|
+
xsalsa20(key: Uint8Array, nonce: Uint8Array, data: Uint8Array, output?: Uint8Array | undefined, counter?: number): Uint8Array;
|
|
172
|
+
createBlake3(opts?: blake3.Blake3Options): blake3.Blake3;
|
|
173
|
+
blake3: typeof blake3.blake3;
|
|
174
|
+
Blake3: typeof blake3.Blake3;
|
|
175
|
+
blake3Exports: {
|
|
176
|
+
Blake3: typeof blake3.Blake3;
|
|
177
|
+
createBlake3: typeof blake3.createBlake3;
|
|
178
|
+
blake3: typeof blake3.blake3;
|
|
179
|
+
};
|
|
180
|
+
createSecretKey: typeof keys.createSecretKey;
|
|
181
|
+
createPublicKey: typeof keys.createPublicKey;
|
|
182
|
+
createPrivateKey: typeof keys.createPrivateKey;
|
|
183
|
+
CryptoKey: typeof keys.CryptoKey;
|
|
184
|
+
generateKey: typeof keys.generateKey;
|
|
185
|
+
generateKeySync: typeof keys.generateKeySync;
|
|
186
|
+
generateKeyPair: (type: utils.KeyPairType, options: utils.GenerateKeyPairOptions, callback: utils.GenerateKeyPairCallback) => void;
|
|
187
|
+
generateKeyPairSync: typeof keys.generateKeyPairSync;
|
|
188
|
+
AsymmetricKeyObject: typeof keys.AsymmetricKeyObject;
|
|
189
|
+
KeyObject: typeof keys.KeyObject;
|
|
190
|
+
createSign: typeof keys.createSign;
|
|
191
|
+
createVerify: typeof keys.createVerify;
|
|
192
|
+
sign: typeof keys.sign;
|
|
193
|
+
verify: typeof keys.verify;
|
|
194
|
+
Sign: typeof keys.Sign;
|
|
195
|
+
Verify: typeof keys.Verify;
|
|
196
|
+
publicEncrypt: typeof keys.publicEncrypt;
|
|
197
|
+
publicDecrypt: typeof keys.publicDecrypt;
|
|
198
|
+
privateEncrypt: typeof keys.privateEncrypt;
|
|
199
|
+
privateDecrypt: typeof keys.privateDecrypt;
|
|
200
|
+
parsePublicKeyEncoding: typeof keys.parsePublicKeyEncoding;
|
|
201
|
+
parsePrivateKeyEncoding: typeof keys.parsePrivateKeyEncoding;
|
|
202
|
+
parseKeyEncoding: typeof keys.parseKeyEncoding;
|
|
203
|
+
SecretKeyObject: typeof keys.SecretKeyObject;
|
|
204
|
+
PublicKeyObject: typeof keys.PublicKeyObject;
|
|
205
|
+
PrivateKeyObject: typeof keys.PrivateKeyObject;
|
|
206
|
+
isCryptoKey: (obj: any) => boolean;
|
|
207
|
+
argon2Sync(algorithm: string, params: argon2Module.Argon2Params): Buffer;
|
|
208
|
+
argon2(algorithm: string, params: argon2Module.Argon2Params, callback: (err: Error | null, result: Buffer) => void): void;
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* Optional. Patch global.crypto with react-native-quick-crypto and
|
|
212
|
+
* global.Buffer with react-native-buffer.
|
|
213
|
+
*/
|
|
214
|
+
export declare const install: () => void;
|
|
215
|
+
export default QuickCrypto;
|
|
216
|
+
export * from './argon2';
|
|
217
|
+
export * from './blake3';
|
|
218
|
+
export { Certificate } from './certificate';
|
|
219
|
+
export { X509Certificate } from './x509certificate';
|
|
220
|
+
export type { CheckOptions, X509LegacyObject } from './x509certificate';
|
|
221
|
+
export * from './cipher';
|
|
222
|
+
export * from './ed';
|
|
223
|
+
export * from './keys';
|
|
224
|
+
export * from './hash';
|
|
225
|
+
export * from './hmac';
|
|
226
|
+
export * from './hkdf';
|
|
227
|
+
export * from './pbkdf2';
|
|
228
|
+
export * from './prime';
|
|
229
|
+
export * from './scrypt';
|
|
230
|
+
export * from './random';
|
|
231
|
+
export * from './ecdh';
|
|
232
|
+
export { getCurves } from './ec';
|
|
233
|
+
export * from './diffie-hellman';
|
|
234
|
+
export * from './mlkem';
|
|
235
|
+
export * from './utils';
|
|
236
|
+
export * from './subtle';
|
|
237
|
+
export { subtle, isCryptoKeyPair } from './subtle';
|
|
238
|
+
export { constants } from './constants';
|
|
239
|
+
export { Buffer } from '@craftzdog/react-native-buffer';
|
|
240
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAGxD,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,mBAAmB,EAAE,CACvB,CAAC,EAAE,MAAM,EACT,gBAAgB,CAAC,EAAE,OAAO,KACvB,WAAW,CAAC;IAEjB,IAAI,qBAAqB,EAAE,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,MAAM,CAAC;CAC1E;AAGD,OAAO,KAAK,YAAY,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,EAAE,MAAM,MAAM,CAAC;AAG3B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAE/B,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAC;AAC/B,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAIjC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AAEnC;;;GAGG;AACH,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAmFqK,cAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BArF3L,yCAA+B,EAAC,YAAe;qBAiC5C,0BACN,EACE,2EAA2E;IAC3E,2BADoB;qBA8BlB,oCACS,EAAC,2BACA;;;;;;qIAkBkhE,CAAC;mKAA85B,CAAC;;;;;;;;;;;;;;+DApB97F,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAlDD,CAAD;gBAEC,CAAF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,OAAO,YAYnB,CAAC;AAYF,eAAe,WAAW,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACxE,cAAc,UAAU,CAAC;AACzB,cAAc,MAAM,CAAC;AACrB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
2
|
+
import type { AsymmetricKeyType, EncodingOptions, JWK, KeyDetail, KeyObjectHandle, KeyUsage, SubtleAlgorithm } from '../utils';
|
|
3
|
+
import { KFormatType, KeyEncoding } from '../utils';
|
|
4
|
+
export declare class CryptoKey {
|
|
5
|
+
keyObject: KeyObject;
|
|
6
|
+
keyAlgorithm: SubtleAlgorithm;
|
|
7
|
+
keyUsages: KeyUsage[];
|
|
8
|
+
keyExtractable: boolean;
|
|
9
|
+
get [Symbol.toStringTag](): string;
|
|
10
|
+
constructor(keyObject: KeyObject, keyAlgorithm: SubtleAlgorithm, keyUsages: KeyUsage[], keyExtractable: boolean);
|
|
11
|
+
inspect(_depth: number, _options: unknown): unknown;
|
|
12
|
+
get type(): "public" | "secret" | "private";
|
|
13
|
+
get extractable(): boolean;
|
|
14
|
+
get algorithm(): SubtleAlgorithm;
|
|
15
|
+
get usages(): KeyUsage[];
|
|
16
|
+
}
|
|
17
|
+
export declare class KeyObject {
|
|
18
|
+
handle: KeyObjectHandle;
|
|
19
|
+
type: 'public' | 'secret' | 'private';
|
|
20
|
+
get [Symbol.toStringTag](): string;
|
|
21
|
+
export(options: {
|
|
22
|
+
format: 'pem';
|
|
23
|
+
} & EncodingOptions): string | Buffer;
|
|
24
|
+
export(options?: {
|
|
25
|
+
format: 'der';
|
|
26
|
+
} & EncodingOptions): Buffer;
|
|
27
|
+
export(options?: {
|
|
28
|
+
format: 'jwk';
|
|
29
|
+
} & EncodingOptions): JWK;
|
|
30
|
+
export(options?: EncodingOptions): string | Buffer | JWK;
|
|
31
|
+
equals(otherKeyObject: KeyObject): boolean;
|
|
32
|
+
constructor(type: string, handle: KeyObjectHandle);
|
|
33
|
+
constructor(type: string, key: ArrayBuffer);
|
|
34
|
+
static from(key: CryptoKey): KeyObject;
|
|
35
|
+
toCryptoKey(algorithm: SubtleAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): CryptoKey;
|
|
36
|
+
static createKeyObject(type: string, key: ArrayBuffer, format?: KFormatType, encoding?: KeyEncoding, passphrase?: ArrayBuffer): KeyObject;
|
|
37
|
+
getAsymmetricKeyType(): undefined;
|
|
38
|
+
getAsymmetricKeyDetails(): undefined;
|
|
39
|
+
}
|
|
40
|
+
export declare class SecretKeyObject extends KeyObject {
|
|
41
|
+
constructor(handle: KeyObjectHandle);
|
|
42
|
+
get symmetricKeySize(): number;
|
|
43
|
+
export(options: {
|
|
44
|
+
format: 'pem';
|
|
45
|
+
} & EncodingOptions): never;
|
|
46
|
+
export(options: {
|
|
47
|
+
format: 'der';
|
|
48
|
+
} & EncodingOptions): Buffer;
|
|
49
|
+
export(options: {
|
|
50
|
+
format: 'jwk';
|
|
51
|
+
} & EncodingOptions): never;
|
|
52
|
+
export(options?: EncodingOptions): Buffer;
|
|
53
|
+
}
|
|
54
|
+
export declare class AsymmetricKeyObject extends KeyObject {
|
|
55
|
+
constructor(type: string, handle: KeyObjectHandle);
|
|
56
|
+
private _asymmetricKeyType?;
|
|
57
|
+
get asymmetricKeyType(): AsymmetricKeyType;
|
|
58
|
+
private _asymmetricKeyDetails?;
|
|
59
|
+
get asymmetricKeyDetails(): KeyDetail;
|
|
60
|
+
get namedCurve(): string | undefined;
|
|
61
|
+
}
|
|
62
|
+
export declare class PublicKeyObject extends AsymmetricKeyObject {
|
|
63
|
+
constructor(handle: KeyObjectHandle);
|
|
64
|
+
export(options: {
|
|
65
|
+
format: 'pem';
|
|
66
|
+
} & EncodingOptions): string;
|
|
67
|
+
export(options: {
|
|
68
|
+
format: 'der';
|
|
69
|
+
} & EncodingOptions): Buffer;
|
|
70
|
+
export(options: {
|
|
71
|
+
format: 'jwk';
|
|
72
|
+
} & EncodingOptions): JWK;
|
|
73
|
+
export(options: {
|
|
74
|
+
format: 'raw-public';
|
|
75
|
+
} & EncodingOptions): Buffer;
|
|
76
|
+
}
|
|
77
|
+
export declare class PrivateKeyObject extends AsymmetricKeyObject {
|
|
78
|
+
constructor(handle: KeyObjectHandle);
|
|
79
|
+
export(options: {
|
|
80
|
+
format: 'pem';
|
|
81
|
+
} & EncodingOptions): string;
|
|
82
|
+
export(options: {
|
|
83
|
+
format: 'der';
|
|
84
|
+
} & EncodingOptions): Buffer;
|
|
85
|
+
export(options: {
|
|
86
|
+
format: 'jwk';
|
|
87
|
+
} & EncodingOptions): JWK;
|
|
88
|
+
export(options: {
|
|
89
|
+
format: 'raw-private';
|
|
90
|
+
} & EncodingOptions): Buffer;
|
|
91
|
+
export(options: {
|
|
92
|
+
format: 'raw-seed';
|
|
93
|
+
} & EncodingOptions): Buffer;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=classes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"classes.d.ts","sourceRoot":"","sources":["../../../src/keys/classes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAExD,OAAO,KAAK,EACV,iBAAiB,EACjB,eAAe,EACf,GAAG,EACH,SAAS,EACT,eAAe,EACf,QAAQ,EACR,eAAe,EAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAW,WAAW,EAAE,WAAW,EAAmB,MAAM,UAAU,CAAC;AAG9E,qBAAa,SAAS;IACpB,SAAS,EAAE,SAAS,CAAC;IACrB,YAAY,EAAE,eAAe,CAAC;IAC9B,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IAExB,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAEjC;gBAGC,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,eAAe,EAC7B,SAAS,EAAE,QAAQ,EAAE,EACrB,cAAc,EAAE,OAAO;IASzB,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO;IAoBnD,IAAI,IAAI,oCAGP;IAED,IAAI,WAAW,YAEd;IAED,IAAI,SAAS,oBAEZ;IAED,IAAI,MAAM,eAET;CACF;AAED,qBAAa,SAAS;IACpB,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IAEtC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,IAAI,MAAM,CAEjC;IAED,MAAM,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE,GAAG,eAAe,GAAG,MAAM,GAAG,MAAM;IACrE,MAAM,CAAC,OAAO,CAAC,EAAE;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE,GAAG,eAAe,GAAG,MAAM;IAC7D,MAAM,CAAC,OAAO,CAAC,EAAE;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE,GAAG,eAAe,GAAG,GAAG;IAC1D,MAAM,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,GAAG;IAOxD,MAAM,CAAC,cAAc,EAAE,SAAS,GAAG,OAAO;gBAO9B,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe;gBACrC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW;IA6B1C,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS;IAStC,WAAW,CACT,SAAS,EAAE,eAAe,EAC1B,WAAW,EAAE,OAAO,EACpB,SAAS,EAAE,QAAQ,EAAE,GACpB,SAAS;IAIZ,MAAM,CAAC,eAAe,CACpB,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,WAAW,EAChB,MAAM,CAAC,EAAE,WAAW,EACpB,QAAQ,CAAC,EAAE,WAAW,EACtB,UAAU,CAAC,EAAE,WAAW,GACvB,SAAS;IAgDZ,oBAAoB,IAAI,SAAS;IAIjC,uBAAuB,IAAI,SAAS;CAGrC;AAED,qBAAa,eAAgB,SAAQ,SAAS;gBAChC,MAAM,EAAE,eAAe;IAInC,IAAI,gBAAgB,IAAI,MAAM,CAE7B;IAED,MAAM,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE,GAAG,eAAe,GAAG,KAAK;IAC3D,MAAM,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE,GAAG,eAAe,GAAG,MAAM;IAC5D,MAAM,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE,GAAG,eAAe,GAAG,KAAK;IAC3D,MAAM,CAAC,OAAO,CAAC,EAAE,eAAe,GAAG,MAAM;CAU1C;AAiBD,qBAAa,mBAAoB,SAAQ,SAAS;gBACpC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe;IAIjD,OAAO,CAAC,kBAAkB,CAAC,CAAoB;IAE/C,IAAI,iBAAiB,IAAI,iBAAiB,CAKzC;IAED,OAAO,CAAC,qBAAqB,CAAC,CAAY;IAE1C,IAAI,oBAAoB,cAKvB;IAED,IAAI,UAAU,IAAI,MAAM,GAAG,SAAS,CAEnC;CACF;AAED,qBAAa,eAAgB,SAAQ,mBAAmB;gBAC1C,MAAM,EAAE,eAAe;IAInC,MAAM,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE,GAAG,eAAe,GAAG,MAAM;IAC5D,MAAM,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE,GAAG,eAAe,GAAG,MAAM;IAC5D,MAAM,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE,GAAG,eAAe,GAAG,GAAG;IACzD,MAAM,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,YAAY,CAAA;KAAE,GAAG,eAAe,GAAG,MAAM;CAoCpE;AAED,qBAAa,gBAAiB,SAAQ,mBAAmB;gBAC3C,MAAM,EAAE,eAAe;IAInC,MAAM,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE,GAAG,eAAe,GAAG,MAAM;IAC5D,MAAM,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE,GAAG,eAAe,GAAG,MAAM;IAC5D,MAAM,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,KAAK,CAAA;KAAE,GAAG,eAAe,GAAG,GAAG;IACzD,MAAM,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,aAAa,CAAA;KAAE,GAAG,eAAe,GAAG,MAAM;IACpE,MAAM,CAAC,OAAO,EAAE;QAAE,MAAM,EAAE,UAAU,CAAA;KAAE,GAAG,eAAe,GAAG,MAAM;CAoClE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type CryptoKeyPair, type GenerateKeyPairCallback, type GenerateKeyPairOptions, type GenerateKeyPairPromiseReturn, type KeyPairType } from '../utils';
|
|
2
|
+
import { type PublicKeyObject, type PrivateKeyObject } from './classes';
|
|
3
|
+
export declare const generateKeyPair: (type: KeyPairType, options: GenerateKeyPairOptions, callback: GenerateKeyPairCallback) => void;
|
|
4
|
+
export declare const generateKeyPairPromise: (type: KeyPairType, options: GenerateKeyPairOptions) => Promise<GenerateKeyPairPromiseReturn>;
|
|
5
|
+
export type KeyObjectKeyPair = {
|
|
6
|
+
publicKey: PublicKeyObject;
|
|
7
|
+
privateKey: PrivateKeyObject;
|
|
8
|
+
};
|
|
9
|
+
type KeyObjectGenerateKeyPairOptions = Omit<GenerateKeyPairOptions, 'publicKeyEncoding' | 'privateKeyEncoding'> & {
|
|
10
|
+
publicKeyEncoding?: undefined;
|
|
11
|
+
privateKeyEncoding?: undefined;
|
|
12
|
+
};
|
|
13
|
+
export declare function generateKeyPairSync(type: KeyPairType): KeyObjectKeyPair;
|
|
14
|
+
export declare function generateKeyPairSync(type: KeyPairType, options: KeyObjectGenerateKeyPairOptions): KeyObjectKeyPair;
|
|
15
|
+
export declare function generateKeyPairSync(type: KeyPairType, options: GenerateKeyPairOptions): CryptoKeyPair;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=generateKeyPair.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generateKeyPair.d.ts","sourceRoot":"","sources":["../../../src/keys/generateKeyPair.ts"],"names":[],"mappings":"AAUA,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,uBAAuB,EAC5B,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EAIjC,KAAK,WAAW,EAIjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACtB,MAAM,WAAW,CAAC;AAmHnB,eAAO,MAAM,eAAe,GAC1B,MAAM,WAAW,EACjB,SAAS,sBAAsB,EAC/B,UAAU,uBAAuB,KAChC,IAGF,CAAC;AAIF,eAAO,MAAM,sBAAsB,GACjC,MAAM,WAAW,EACjB,SAAS,sBAAsB,KAC9B,OAAO,CAAC,4BAA4B,CAUtC,CAAC;AAGF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,SAAS,EAAE,eAAe,CAAC;IAC3B,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF,KAAK,+BAA+B,GAAG,IAAI,CACzC,sBAAsB,EACtB,mBAAmB,GAAG,oBAAoB,CAC3C,GAAG;IACF,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,kBAAkB,CAAC,EAAE,SAAS,CAAC;CAChC,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,WAAW,GAAG,gBAAgB,CAAC;AACzE,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,+BAA+B,GACvC,gBAAgB,CAAC;AACpB,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,WAAW,EACjB,OAAO,EAAE,sBAAsB,GAC9B,aAAa,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AsymmetricKeyObject, CryptoKey, KeyObject, SecretKeyObject, PublicKeyObject, PrivateKeyObject } from './classes';
|
|
2
|
+
import { generateKeyPair, generateKeyPairSync } from './generateKeyPair';
|
|
3
|
+
import { createSign, createVerify, sign, verify, Sign, Verify } from './signVerify';
|
|
4
|
+
import { publicEncrypt, publicDecrypt, privateEncrypt, privateDecrypt } from './publicCipher';
|
|
5
|
+
import { isCryptoKey, parseKeyEncoding, parsePrivateKeyEncoding, parsePublicKeyEncoding } from './utils';
|
|
6
|
+
import type { BinaryLike, JWK } from '../utils';
|
|
7
|
+
interface KeyInputObject {
|
|
8
|
+
key: BinaryLike | KeyObject | CryptoKey | JWK;
|
|
9
|
+
format?: 'pem' | 'der' | 'jwk' | 'raw-public' | 'raw-private' | 'raw-seed';
|
|
10
|
+
type?: 'pkcs1' | 'pkcs8' | 'spki' | 'sec1';
|
|
11
|
+
passphrase?: BinaryLike;
|
|
12
|
+
encoding?: BufferEncoding;
|
|
13
|
+
asymmetricKeyType?: string;
|
|
14
|
+
namedCurve?: string;
|
|
15
|
+
}
|
|
16
|
+
type KeyInput = BinaryLike | KeyInputObject | KeyObject | CryptoKey;
|
|
17
|
+
declare function createSecretKey(key: BinaryLike): SecretKeyObject;
|
|
18
|
+
declare function createPublicKey(key: KeyInput): PublicKeyObject;
|
|
19
|
+
declare function createPrivateKey(key: KeyInput): PrivateKeyObject;
|
|
20
|
+
export interface GenerateKeyOptions {
|
|
21
|
+
length: number;
|
|
22
|
+
}
|
|
23
|
+
declare function generateKeySync(type: 'aes' | 'hmac', options: GenerateKeyOptions): SecretKeyObject;
|
|
24
|
+
declare function generateKey(type: 'aes' | 'hmac', options: GenerateKeyOptions, callback: (err: Error | null, key?: SecretKeyObject) => void): void;
|
|
25
|
+
export { createSecretKey, createPublicKey, createPrivateKey, CryptoKey, generateKey, generateKeySync, generateKeyPair, generateKeyPairSync, AsymmetricKeyObject, KeyObject, createSign, createVerify, sign, verify, Sign, Verify, publicEncrypt, publicDecrypt, privateEncrypt, privateDecrypt, parsePublicKeyEncoding, parsePrivateKeyEncoding, parseKeyEncoding, SecretKeyObject, PublicKeyObject, PrivateKeyObject, isCryptoKey, };
|
|
26
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/keys/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,SAAS,EACT,SAAS,EACT,eAAe,EACf,eAAe,EACf,gBAAgB,EACjB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACzE,OAAO,EACL,UAAU,EACV,YAAY,EACZ,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,MAAM,EACP,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EACf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,uBAAuB,EACvB,sBAAsB,EACvB,MAAM,SAAS,CAAC;AAEjB,OAAO,KAAK,EAAE,UAAU,EAAE,GAAG,EAAmB,MAAM,UAAU,CAAC;AAUjE,UAAU,cAAc;IACtB,GAAG,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,GAAG,CAAC;IAC9C,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,YAAY,GAAG,aAAa,GAAG,UAAU,CAAC;IAC3E,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAC3C,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,QAAQ,CAAC,EAAE,cAAc,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,KAAK,QAAQ,GAAG,UAAU,GAAG,cAAc,GAAG,SAAS,GAAG,SAAS,CAAC;AAsDpE,iBAAS,eAAe,CAAC,GAAG,EAAE,UAAU,GAAG,eAAe,CAGzD;AAwFD,iBAAS,eAAe,CAAC,GAAG,EAAE,QAAQ,GAAG,eAAe,CAmDvD;AAED,iBAAS,gBAAgB,CAAC,GAAG,EAAE,QAAQ,GAAG,gBAAgB,CAqCzD;AAED,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,iBAAS,eAAe,CACtB,IAAI,EAAE,KAAK,GAAG,MAAM,EACpB,OAAO,EAAE,kBAAkB,GAC1B,eAAe,CAsCjB;AAED,iBAAS,WAAW,CAClB,IAAI,EAAE,KAAK,GAAG,MAAM,EACpB,OAAO,EAAE,kBAAkB,EAC3B,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,GAAG,CAAC,EAAE,eAAe,KAAK,IAAI,GAC3D,IAAI,CAWN;AAED,OAAO,EAEL,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,SAAS,EACT,WAAW,EACX,eAAe,EACf,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,SAAS,EACT,UAAU,EACV,YAAY,EACZ,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,MAAM,EACN,aAAa,EACb,aAAa,EACb,cAAc,EACd,cAAc,EAGd,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,WAAW,GACZ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
2
|
+
import type { BinaryLike } from '../utils';
|
|
3
|
+
import { KeyObject, CryptoKey } from './classes';
|
|
4
|
+
interface PublicCipherOptions {
|
|
5
|
+
key: BinaryLike | KeyObject | CryptoKey;
|
|
6
|
+
padding?: number;
|
|
7
|
+
oaepHash?: string;
|
|
8
|
+
oaepLabel?: BinaryLike;
|
|
9
|
+
}
|
|
10
|
+
type PublicCipherInput = BinaryLike | KeyObject | CryptoKey | PublicCipherOptions;
|
|
11
|
+
interface PrivateCipherOptions {
|
|
12
|
+
key: BinaryLike | KeyObject | CryptoKey;
|
|
13
|
+
padding?: number;
|
|
14
|
+
oaepHash?: string;
|
|
15
|
+
oaepLabel?: BinaryLike;
|
|
16
|
+
}
|
|
17
|
+
type PrivateCipherInput = BinaryLike | KeyObject | CryptoKey | PrivateCipherOptions;
|
|
18
|
+
export declare function publicEncrypt(key: PublicCipherInput, buffer: BinaryLike): Buffer;
|
|
19
|
+
export declare function publicDecrypt(key: PublicCipherInput, buffer: BinaryLike): Buffer;
|
|
20
|
+
export declare function privateEncrypt(key: PrivateCipherInput, buffer: BinaryLike): Buffer;
|
|
21
|
+
export declare function privateDecrypt(key: PrivateCipherInput, buffer: BinaryLike): Buffer;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=publicCipher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publicCipher.d.ts","sourceRoot":"","sources":["../../../src/keys/publicCipher.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAQ3C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGjD,UAAU,mBAAmB;IAC3B,GAAG,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,UAAU,CAAC;CACxB;AAED,KAAK,iBAAiB,GAClB,UAAU,GACV,SAAS,GACT,SAAS,GACT,mBAAmB,CAAC;AAExB,UAAU,oBAAoB;IAC5B,GAAG,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,UAAU,CAAC;CACxB;AAED,KAAK,kBAAkB,GACnB,UAAU,GACV,SAAS,GACT,SAAS,GACT,oBAAoB,CAAC;AA+DzB,wBAAgB,aAAa,CAC3B,GAAG,EAAE,iBAAiB,EACtB,MAAM,EAAE,UAAU,GACjB,MAAM,CAuBR;AAED,wBAAgB,aAAa,CAC3B,GAAG,EAAE,iBAAiB,EACtB,MAAM,EAAE,UAAU,GACjB,MAAM,CAsBR;AAoDD,wBAAgB,cAAc,CAC5B,GAAG,EAAE,kBAAkB,EACvB,MAAM,EAAE,UAAU,GACjB,MAAM,CAiBR;AAED,wBAAgB,cAAc,CAC5B,GAAG,EAAE,kBAAkB,EACvB,MAAM,EAAE,UAAU,GACjB,MAAM,CAwBR"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
2
|
+
import { KeyObject, CryptoKey } from './classes';
|
|
3
|
+
import type { BinaryLike } from '../utils';
|
|
4
|
+
type KeyInput = BinaryLike | KeyObject | CryptoKey | KeyInputObject;
|
|
5
|
+
interface KeyInputObject {
|
|
6
|
+
key: BinaryLike | KeyObject | CryptoKey;
|
|
7
|
+
format?: 'pem' | 'der';
|
|
8
|
+
type?: 'pkcs1' | 'pkcs8' | 'spki' | 'sec1';
|
|
9
|
+
passphrase?: BinaryLike;
|
|
10
|
+
padding?: number;
|
|
11
|
+
saltLength?: number;
|
|
12
|
+
dsaEncoding?: 'der' | 'ieee-p1363';
|
|
13
|
+
}
|
|
14
|
+
export declare class Sign {
|
|
15
|
+
private handle;
|
|
16
|
+
constructor(algorithm: string);
|
|
17
|
+
update(data: BinaryLike): this;
|
|
18
|
+
sign(privateKey: KeyInput, outputEncoding?: BufferEncoding): Buffer;
|
|
19
|
+
}
|
|
20
|
+
export declare class Verify {
|
|
21
|
+
private handle;
|
|
22
|
+
constructor(algorithm: string);
|
|
23
|
+
update(data: BinaryLike): this;
|
|
24
|
+
verify(publicKey: KeyInput, signature: BinaryLike, signatureEncoding?: BufferEncoding): boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare function createSign(algorithm: string): Sign;
|
|
27
|
+
export declare function createVerify(algorithm: string): Verify;
|
|
28
|
+
type SignCallback = (err: Error | null, signature?: Buffer) => void;
|
|
29
|
+
type VerifyCallback = (err: Error | null, result?: boolean) => void;
|
|
30
|
+
export declare function sign(algorithm: string | null | undefined, data: BinaryLike, key: KeyInput): Buffer;
|
|
31
|
+
export declare function sign(algorithm: string | null | undefined, data: BinaryLike, key: KeyInput, callback: SignCallback): void;
|
|
32
|
+
export declare function verify(algorithm: string | null | undefined, data: BinaryLike, key: KeyInput, signature: BinaryLike): boolean;
|
|
33
|
+
export declare function verify(algorithm: string | null | undefined, data: BinaryLike, key: KeyInput, signature: BinaryLike, callback: VerifyCallback): void;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=signVerify.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signVerify.d.ts","sourceRoot":"","sources":["../../../src/keys/signVerify.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAMxD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAS3C,KAAK,QAAQ,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,cAAc,CAAC;AAEpE,UAAU,cAAc;IACtB,GAAG,EAAE,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;IACxC,MAAM,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAC3C,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,KAAK,GAAG,YAAY,CAAC;CACpC;AAkID,qBAAa,IAAI;IACf,OAAO,CAAC,MAAM,CAAiB;gBAEnB,SAAS,EAAE,MAAM;IAK7B,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAM9B,IAAI,CAAC,UAAU,EAAE,QAAQ,EAAE,cAAc,CAAC,EAAE,cAAc,GAAG,MAAM;CAqBpE;AAED,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAmB;gBAErB,SAAS,EAAE,MAAM;IAM7B,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI;IAM9B,MAAM,CACJ,SAAS,EAAE,QAAQ,EACnB,SAAS,EAAE,UAAU,EACrB,iBAAiB,CAAC,EAAE,cAAc,GACjC,OAAO;CAuBX;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAElD;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED,KAAK,YAAY,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,SAAS,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;AACpE,KAAK,cAAc,GAAG,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;AAEpE,wBAAgB,IAAI,CAClB,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,QAAQ,GACZ,MAAM,CAAC;AACV,wBAAgB,IAAI,CAClB,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,QAAQ,EACb,QAAQ,EAAE,YAAY,GACrB,IAAI,CAAC;AA6BR,wBAAgB,MAAM,CACpB,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,QAAQ,EACb,SAAS,EAAE,UAAU,GACpB,OAAO,CAAC;AACX,wBAAgB,MAAM,CACpB,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,IAAI,EAAE,UAAU,EAChB,GAAG,EAAE,QAAQ,EACb,SAAS,EAAE,UAAU,EACrB,QAAQ,EAAE,cAAc,GACvB,IAAI,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { KeyEncoding, KFormatType } from '../utils';
|
|
2
|
+
import type { CryptoKeyPair, EncodingOptions } from '../utils';
|
|
3
|
+
import type { CryptoKey, PublicKeyObject, PrivateKeyObject } from './classes';
|
|
4
|
+
export declare const isCryptoKey: (obj: any) => boolean;
|
|
5
|
+
export declare function exportPublicKeyRaw(pub: PublicKeyObject, pointType: 'compressed' | 'uncompressed' | undefined): ArrayBuffer;
|
|
6
|
+
export declare function exportPrivateKeyRaw(priv: PrivateKeyObject, format: 'raw-private' | 'raw-seed'): ArrayBuffer;
|
|
7
|
+
export declare function getCryptoKeyPair(key: CryptoKey | CryptoKeyPair): CryptoKeyPair;
|
|
8
|
+
/**
|
|
9
|
+
* Parses the public key encoding based on an object. keyType must be undefined
|
|
10
|
+
* when this is used to parse an input encoding and must be a valid key type if
|
|
11
|
+
* used to parse an output encoding.
|
|
12
|
+
*/
|
|
13
|
+
export declare function parsePublicKeyEncoding(enc: EncodingOptions, keyType: string | undefined, objName?: string): {
|
|
14
|
+
format: "raw-private" | "raw-seed" | "raw-public";
|
|
15
|
+
type: KeyEncoding | "compressed" | "uncompressed" | undefined;
|
|
16
|
+
cipher: undefined;
|
|
17
|
+
passphrase: undefined;
|
|
18
|
+
} | {
|
|
19
|
+
format: KFormatType;
|
|
20
|
+
type: KeyEncoding | "compressed" | "uncompressed" | undefined;
|
|
21
|
+
cipher: string | undefined;
|
|
22
|
+
passphrase: ArrayBuffer | undefined;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Parses the private key encoding based on an object. keyType must be undefined
|
|
26
|
+
* when this is used to parse an input encoding and must be a valid key type if
|
|
27
|
+
* used to parse an output encoding.
|
|
28
|
+
*/
|
|
29
|
+
export declare function parsePrivateKeyEncoding(enc: EncodingOptions, keyType: string | undefined, objName?: string): {
|
|
30
|
+
format: "raw-private" | "raw-seed" | "raw-public";
|
|
31
|
+
type: KeyEncoding | "compressed" | "uncompressed" | undefined;
|
|
32
|
+
cipher: undefined;
|
|
33
|
+
passphrase: undefined;
|
|
34
|
+
} | {
|
|
35
|
+
format: KFormatType;
|
|
36
|
+
type: KeyEncoding | "compressed" | "uncompressed" | undefined;
|
|
37
|
+
cipher: string | undefined;
|
|
38
|
+
passphrase: ArrayBuffer | undefined;
|
|
39
|
+
};
|
|
40
|
+
export declare function parseKeyEncoding(enc: EncodingOptions, keyType?: string, isPublic?: boolean, objName?: string): {
|
|
41
|
+
format: "raw-private" | "raw-seed" | "raw-public";
|
|
42
|
+
type: KeyEncoding | "compressed" | "uncompressed" | undefined;
|
|
43
|
+
cipher: undefined;
|
|
44
|
+
passphrase: undefined;
|
|
45
|
+
} | {
|
|
46
|
+
format: KFormatType;
|
|
47
|
+
type: KeyEncoding | "compressed" | "uncompressed" | undefined;
|
|
48
|
+
cipher: string | undefined;
|
|
49
|
+
passphrase: ArrayBuffer | undefined;
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/keys/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,WAAW,EACX,WAAW,EACZ,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAG9E,eAAO,MAAM,WAAW,GAAI,KAAK,GAAG,KAAG,OAEtC,CAAC;AAEF,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,eAAe,EACpB,SAAS,EAAE,YAAY,GAAG,cAAc,GAAG,SAAS,GACnD,WAAW,CAKb;AAED,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,aAAa,GAAG,UAAU,GACjC,WAAW,CAQb;AAED,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,SAAS,GAAG,aAAa,GAC7B,aAAa,CAGf;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,eAAe,EACpB,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,CAAC,EAAE,MAAM;;;;;;;;;;EAGjB;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,eAAe,EACpB,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,OAAO,CAAC,EAAE,MAAM;;;;;;;;;;EAGjB;AAED,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,eAAe,EACpB,OAAO,CAAC,EAAE,MAAM,EAChB,QAAQ,CAAC,EAAE,OAAO,EAClB,OAAO,CAAC,EAAE,MAAM;;;;;;;;;;EAiEjB"}
|