@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 @@
|
|
|
1
|
+
{"version":3,"names":["NitroModules","Buffer","PublicKeyObject","KeyObject","binaryLikeToArrayBuffer","X509_CHECK_FLAG_ALWAYS_CHECK_SUBJECT","X509_CHECK_FLAG_NO_WILDCARDS","X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS","X509_CHECK_FLAG_MULTI_LABEL_WILDCARDS","X509_CHECK_FLAG_SINGLE_LABEL_SUBDOMAINS","X509_CHECK_FLAG_NEVER_CHECK_SUBJECT","getFlags","options","flags","subject","wildcards","partialWildcards","multiLabelWildcards","singleLabelSubdomains","X509Certificate","cache","Map","constructor","buffer","handle","createHybridObject","ab","init","cached","key","compute","has","get","value","set","subjectAltName","issuer","infoAccess","validFrom","validTo","validFromDate","Date","validToDate","fingerprint","fingerprint256","fingerprint512","extKeyUsage","keyUsage","serialNumber","signatureAlgorithm","signatureAlgorithmOid","ca","raw","from","publicKey","issuerCertificate","undefined","checkHost","name","TypeError","checkEmail","email","checkIP","ip","checkIssued","otherCert","checkPrivateKey","pkey","type","verify","toString","pem","toJSON","toLegacyObject","subjectaltname","modulus","bits","exponent","valid_from","valid_to","ext_key_usage"],"sourceRoot":"../../src","sources":["x509certificate.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,4BAA4B;AACzD,SAASC,MAAM,QAAQ,gCAAgC;AAEvD,SAASC,eAAe,EAA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EAEAC,MAAMA,CAAA,EAAW;IACf,OAAO,IAAI,CAACF,QAAQ,CAAC,CAAC;EACxB;EAEAG,cAAcA,CAAA,EAAqB;IACjC,OAAO;MACL3D,OAAO,EAAE,IAAI,CAACA,OAAO;MACrBsB,MAAM,EAAE,IAAI,CAACA,MAAM;MACnBsC,cAAc,EAAE,IAAI,CAACvC,cAAc;MACnCE,UAAU,EAAE,IAAI,CAACA,UAAU;MAC3Bc,EAAE,EAAE,IAAI,CAACA,EAAE;MACXwB,OAAO,EAAEnB,SAAS;MAClBoB,IAAI,EAAEpB,SAAS;MACfqB,QAAQ,EAAErB,SAAS;MACnBsB,UAAU,EAAE,IAAI,CAACxC,SAAS;MAC1ByC,QAAQ,EAAE,IAAI,CAACxC,OAAO;MACtBI,WAAW,EAAE,IAAI,CAACA,WAAW;MAC7BC,cAAc,EAAE,IAAI,CAACA,cAAc;MACnCC,cAAc,EAAE,IAAI,CAACA,cAAc;MACnCmC,aAAa,EAAE,IAAI,CAACjC,QAAQ;MAC5BC,YAAY,EAAE,IAAI,CAACA,YAAY;MAC/BI,GAAG,EAAE,IAAI,CAACA;IACZ,CAAC;EACH;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
2
|
+
import type { BinaryLike } from './utils';
|
|
3
|
+
export interface Argon2Params {
|
|
4
|
+
message: BinaryLike;
|
|
5
|
+
nonce: BinaryLike;
|
|
6
|
+
parallelism: number;
|
|
7
|
+
tagLength: number;
|
|
8
|
+
memory: number;
|
|
9
|
+
passes: number;
|
|
10
|
+
secret?: BinaryLike;
|
|
11
|
+
associatedData?: BinaryLike;
|
|
12
|
+
version?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function argon2Sync(algorithm: string, params: Argon2Params): Buffer;
|
|
15
|
+
export declare function argon2(algorithm: string, params: Argon2Params, callback: (err: Error | null, result: Buffer) => void): void;
|
|
16
|
+
//# sourceMappingURL=argon2.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"argon2.d.ts","sourceRoot":"","sources":["../../src/argon2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAIxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAU1C,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,UAAU,CAAC;IACpB,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,cAAc,CAAC,EAAE,UAAU,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAwFD,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,MAAM,CAiB1E;AAED,wBAAgB,MAAM,CACpB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,CAAC,GAAG,EAAE,KAAK,GAAG,IAAI,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,GACpD,IAAI,CAyBN"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
2
|
+
import type { BinaryLike, Encoding } from './utils';
|
|
3
|
+
export interface Blake3Options {
|
|
4
|
+
dkLen?: number;
|
|
5
|
+
key?: Uint8Array;
|
|
6
|
+
context?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class Blake3 {
|
|
9
|
+
private native;
|
|
10
|
+
private mode;
|
|
11
|
+
private keyData?;
|
|
12
|
+
private contextData?;
|
|
13
|
+
constructor(opts?: Blake3Options);
|
|
14
|
+
update(data: BinaryLike, inputEncoding?: Encoding): this;
|
|
15
|
+
digest(): Buffer;
|
|
16
|
+
digest(encoding: Encoding): string;
|
|
17
|
+
digest(length: number): Buffer;
|
|
18
|
+
digestLength(length: number): Buffer;
|
|
19
|
+
reset(): this;
|
|
20
|
+
copy(): Blake3;
|
|
21
|
+
static getVersion(): string;
|
|
22
|
+
}
|
|
23
|
+
export declare function createBlake3(opts?: Blake3Options): Blake3;
|
|
24
|
+
export declare function blake3(data: BinaryLike, opts?: Blake3Options): Uint8Array;
|
|
25
|
+
export declare namespace blake3 {
|
|
26
|
+
var create: typeof createBlake3;
|
|
27
|
+
}
|
|
28
|
+
export declare const blake3Exports: {
|
|
29
|
+
Blake3: typeof Blake3;
|
|
30
|
+
createBlake3: typeof createBlake3;
|
|
31
|
+
blake3: typeof blake3;
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=blake3.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blake3.d.ts","sourceRoot":"","sources":["../../src/blake3.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAOpD,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,MAAM;IACjB,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,IAAI,CAAiC;IAC7C,OAAO,CAAC,OAAO,CAAC,CAAa;IAC7B,OAAO,CAAC,WAAW,CAAC,CAAS;gBAEjB,IAAI,CAAC,EAAE,aAAa;IA6BhC,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,aAAa,CAAC,EAAE,QAAQ,GAAG,IAAI;IAMxD,MAAM,IAAI,MAAM;IAChB,MAAM,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM;IAClC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAoB9B,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM;IAIpC,KAAK,IAAI,IAAI;IAKb,IAAI,IAAI,MAAM;IAUd,MAAM,CAAC,UAAU,IAAI,MAAM;CAK5B;AAED,wBAAgB,YAAY,CAAC,IAAI,CAAC,EAAE,aAAa,GAAG,MAAM,CAEzD;AAED,wBAAgB,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,CAAC,EAAE,aAAa,GAAG,UAAU,CAMzE;yBANe,MAAM;;;AAUtB,eAAO,MAAM,aAAa;;;;CAIzB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
2
|
+
import type { BinaryLike } from './utils';
|
|
3
|
+
export declare class Certificate {
|
|
4
|
+
static exportChallenge(spkac: BinaryLike, encoding?: BufferEncoding): Buffer;
|
|
5
|
+
static exportPublicKey(spkac: BinaryLike, encoding?: BufferEncoding): Buffer;
|
|
6
|
+
static verifySpkac(spkac: BinaryLike, encoding?: BufferEncoding): boolean;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=certificate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"certificate.d.ts","sourceRoot":"","sources":["../../src/certificate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAExD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAqB1C,qBAAa,WAAW;IACtB,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,MAAM;IAM5E,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,MAAM;IAM5E,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,OAAO;CAG1E"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import Stream, { type TransformOptions } from 'readable-stream';
|
|
2
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
3
|
+
import type { BinaryLike, BinaryLikeNode, Encoding } from './utils';
|
|
4
|
+
import type { CipherCCMOptions, CipherCCMTypes, CipherGCMTypes, CipherGCMOptions, CipherOCBOptions, CipherOCBTypes } from 'crypto';
|
|
5
|
+
export type CipherOptions = CipherCCMOptions | CipherOCBOptions | CipherGCMOptions | TransformOptions;
|
|
6
|
+
export interface CipherInfoResult {
|
|
7
|
+
name: string;
|
|
8
|
+
nid: number;
|
|
9
|
+
mode: string;
|
|
10
|
+
keyLength: number;
|
|
11
|
+
blockSize?: number;
|
|
12
|
+
ivLength?: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function getCiphers(): string[];
|
|
15
|
+
export declare function getCipherInfo(name: string, options?: {
|
|
16
|
+
keyLength?: number;
|
|
17
|
+
ivLength?: number;
|
|
18
|
+
}): CipherInfoResult | undefined;
|
|
19
|
+
interface CipherArgs {
|
|
20
|
+
isCipher: boolean;
|
|
21
|
+
cipherType: string;
|
|
22
|
+
cipherKey: BinaryLikeNode;
|
|
23
|
+
iv: BinaryLike;
|
|
24
|
+
options?: CipherOptions;
|
|
25
|
+
}
|
|
26
|
+
declare class CipherCommon extends Stream.Transform {
|
|
27
|
+
private native;
|
|
28
|
+
private _decoder;
|
|
29
|
+
private _decoderEncoding;
|
|
30
|
+
constructor({ isCipher, cipherType, cipherKey, iv, options }: CipherArgs);
|
|
31
|
+
private getDecoder;
|
|
32
|
+
update(data: Buffer): Buffer;
|
|
33
|
+
update(data: BinaryLike, inputEncoding?: Encoding): Buffer;
|
|
34
|
+
update(data: BinaryLike, inputEncoding: Encoding, outputEncoding: Encoding): string;
|
|
35
|
+
final(): Buffer;
|
|
36
|
+
final(outputEncoding: BufferEncoding | 'buffer'): string;
|
|
37
|
+
_transform(chunk: BinaryLike, encoding: BufferEncoding, callback: (err?: Error | null) => void): void;
|
|
38
|
+
_flush(callback: (err?: Error | null) => void): void;
|
|
39
|
+
setAutoPadding(autoPadding?: boolean): this;
|
|
40
|
+
setAAD(buffer: Buffer, options?: {
|
|
41
|
+
plaintextLength: number;
|
|
42
|
+
}): this;
|
|
43
|
+
getAuthTag(): Buffer;
|
|
44
|
+
setAuthTag(tag: Buffer): this;
|
|
45
|
+
getSupportedCiphers(): string[];
|
|
46
|
+
}
|
|
47
|
+
declare class Cipheriv extends CipherCommon {
|
|
48
|
+
constructor(cipherType: string, cipherKey: BinaryLikeNode, iv: BinaryLike, options?: CipherOptions);
|
|
49
|
+
}
|
|
50
|
+
export type Cipher = Cipheriv;
|
|
51
|
+
declare class Decipheriv extends CipherCommon {
|
|
52
|
+
constructor(cipherType: string, cipherKey: BinaryLikeNode, iv: BinaryLike, options?: CipherOptions);
|
|
53
|
+
}
|
|
54
|
+
export type Decipher = Decipheriv;
|
|
55
|
+
export declare function createDecipheriv(algorithm: CipherCCMTypes, key: BinaryLikeNode, iv: BinaryLike, options: CipherCCMOptions): Decipher;
|
|
56
|
+
export declare function createDecipheriv(algorithm: CipherOCBTypes, key: BinaryLikeNode, iv: BinaryLike, options: CipherOCBOptions): Decipher;
|
|
57
|
+
export declare function createDecipheriv(algorithm: CipherGCMTypes, key: BinaryLikeNode, iv: BinaryLike, options?: CipherGCMOptions): Decipher;
|
|
58
|
+
export declare function createDecipheriv(algorithm: string, key: BinaryLikeNode, iv: BinaryLike, options?: TransformOptions): Decipher;
|
|
59
|
+
export declare function createCipheriv(algorithm: CipherCCMTypes, key: BinaryLikeNode, iv: BinaryLike, options: CipherCCMOptions): Cipher;
|
|
60
|
+
export declare function createCipheriv(algorithm: CipherOCBTypes, key: BinaryLikeNode, iv: BinaryLike, options: CipherOCBOptions): Cipher;
|
|
61
|
+
export declare function createCipheriv(algorithm: CipherGCMTypes, key: BinaryLikeNode, iv: BinaryLike, options?: CipherGCMOptions): Cipher;
|
|
62
|
+
export declare function createCipheriv(algorithm: string, key: BinaryLikeNode, iv: BinaryLike, options?: TransformOptions): Cipher;
|
|
63
|
+
/**
|
|
64
|
+
* xsalsa20 stream encryption with @noble/ciphers compatible API
|
|
65
|
+
*
|
|
66
|
+
* @param key - 32 bytes
|
|
67
|
+
* @param nonce - 24 bytes
|
|
68
|
+
* @param data - data to encrypt
|
|
69
|
+
* @param output - unused
|
|
70
|
+
* @param counter - unused
|
|
71
|
+
* @returns encrypted data
|
|
72
|
+
*/
|
|
73
|
+
export declare function xsalsa20(key: Uint8Array, nonce: Uint8Array, data: Uint8Array, output?: Uint8Array | undefined, counter?: number): Uint8Array;
|
|
74
|
+
export {};
|
|
75
|
+
//# sourceMappingURL=cipher.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cipher.d.ts","sourceRoot":"","sources":["../../src/cipher.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,EAAE,EAAE,KAAK,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEhE,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACf,MAAM,QAAQ,CAAC;AAahB,MAAM,MAAM,aAAa,GACrB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,CAAC;AAErB,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAiBD,wBAAgB,UAAU,IAAI,MAAM,EAAE,CAEr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AAE,UAAU,EACd,OAAO,EAAE,gBAAgB,GACxB,MAAM,CAAC;AACV,wBAAgB,cAAc,CAC5B,SAAS,EAAE,cAAc,EACzB,GAAG,EAAE,cAAc,EACnB,EAAE,EAAE,UAAU,EACd,OAAO,EAAE,gBAAgB,GACxB,MAAM,CAAC;AACV,wBAAgB,cAAc,CAC5B,SAAS,EAAE,cAAc,EACzB,GAAG,EAAE,cAAc,EACnB,EAAE,EAAE,UAAU,EACd,OAAO,CAAC,EAAE,gBAAgB,GACzB,MAAM,CAAC;AACV,wBAAgB,cAAc,CAC5B,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,cAAc,EACnB,EAAE,EAAE,UAAU,EACd,OAAO,CAAC,EAAE,gBAAgB,GACzB,MAAM,CAAC;AAUV;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,CACtB,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,UAAU,EAGhB,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,EAG/B,OAAO,CAAC,EAAE,MAAM,GACf,UAAU,CAeZ"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const constants: {
|
|
2
|
+
readonly RSA_PKCS1_PADDING: 1;
|
|
3
|
+
readonly RSA_NO_PADDING: 3;
|
|
4
|
+
readonly RSA_PKCS1_OAEP_PADDING: 4;
|
|
5
|
+
readonly RSA_X931_PADDING: 5;
|
|
6
|
+
readonly RSA_PKCS1_PSS_PADDING: 6;
|
|
7
|
+
readonly RSA_PSS_SALTLEN_DIGEST: -1;
|
|
8
|
+
readonly RSA_PSS_SALTLEN_MAX_SIGN: -2;
|
|
9
|
+
readonly RSA_PSS_SALTLEN_AUTO: -2;
|
|
10
|
+
readonly POINT_CONVERSION_COMPRESSED: 2;
|
|
11
|
+
readonly POINT_CONVERSION_UNCOMPRESSED: 4;
|
|
12
|
+
readonly POINT_CONVERSION_HYBRID: 6;
|
|
13
|
+
readonly DH_CHECK_P_NOT_PRIME: 1;
|
|
14
|
+
readonly DH_CHECK_P_NOT_SAFE_PRIME: 2;
|
|
15
|
+
readonly DH_UNABLE_TO_CHECK_GENERATOR: 4;
|
|
16
|
+
readonly DH_NOT_SUITABLE_GENERATOR: 8;
|
|
17
|
+
readonly OPENSSL_VERSION_NUMBER: 805306368;
|
|
18
|
+
};
|
|
19
|
+
export declare const defaultCoreCipherList = "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256";
|
|
20
|
+
export declare const defaultCipherList = "TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256";
|
|
21
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;CA0BZ,CAAC;AAEX,eAAO,MAAM,qBAAqB,+EAC4C,CAAC;AAC/E,eAAO,MAAM,iBAAiB,+EACgD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dh-groups.d.ts","sourceRoot":"","sources":["../../src/dh-groups.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CA0B1E,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
2
|
+
import { PublicKeyObject, PrivateKeyObject } from './keys/classes';
|
|
3
|
+
import type { DhKeyPair } from './specs/dhKeyPair.nitro';
|
|
4
|
+
import type { GenerateKeyPairOptions, KeyPairGenConfig } from './utils/types';
|
|
5
|
+
export declare class DhKeyPairGen {
|
|
6
|
+
native: DhKeyPair;
|
|
7
|
+
constructor(options: GenerateKeyPairOptions);
|
|
8
|
+
generateKeyPair(): Promise<void>;
|
|
9
|
+
generateKeyPairSync(): void;
|
|
10
|
+
}
|
|
11
|
+
export declare function dh_generateKeyPairNode(options: GenerateKeyPairOptions | undefined, encoding: KeyPairGenConfig): Promise<{
|
|
12
|
+
publicKey: PublicKeyObject | Buffer | string | ArrayBuffer;
|
|
13
|
+
privateKey: PrivateKeyObject | Buffer | string | ArrayBuffer;
|
|
14
|
+
}>;
|
|
15
|
+
export declare function dh_generateKeyPairNodeSync(options: GenerateKeyPairOptions | undefined, encoding: KeyPairGenConfig): {
|
|
16
|
+
publicKey: PublicKeyObject | Buffer | string | ArrayBuffer;
|
|
17
|
+
privateKey: PrivateKeyObject | Buffer | string | ArrayBuffer;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=dhKeyPair.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dhKeyPair.d.ts","sourceRoot":"","sources":["../../src/dhKeyPair.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAa,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAI9E,qBAAa,YAAY;IACvB,MAAM,EAAE,SAAS,CAAC;gBAEN,OAAO,EAAE,sBAAsB;IAwCrC,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAItC,mBAAmB,IAAI,IAAI;CAG5B;AAmFD,wBAAsB,sBAAsB,CAC1C,OAAO,EAAE,sBAAsB,GAAG,SAAS,EAC3C,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC;IACT,SAAS,EAAE,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;IAC3D,UAAU,EAAE,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;CAC9D,CAAC,CAID;AAED,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,sBAAsB,GAAG,SAAS,EAC3C,QAAQ,EAAE,gBAAgB,GACzB;IACD,SAAS,EAAE,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;IAC3D,UAAU,EAAE,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;CAC9D,CAIA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
2
|
+
export declare class DiffieHellman {
|
|
3
|
+
private _hybrid;
|
|
4
|
+
constructor(sizeOrPrime: number | Buffer | string, generator?: number | Buffer | string, encoding?: BufferEncoding);
|
|
5
|
+
generateKeys(encoding?: BufferEncoding): Buffer | string;
|
|
6
|
+
computeSecret(otherPublicKey: Buffer | string, inputEncoding?: BufferEncoding, outputEncoding?: BufferEncoding): Buffer | string;
|
|
7
|
+
getPrime(encoding?: BufferEncoding): Buffer | string;
|
|
8
|
+
getGenerator(encoding?: BufferEncoding): Buffer | string;
|
|
9
|
+
getPublicKey(encoding?: BufferEncoding): Buffer | string;
|
|
10
|
+
getPrivateKey(encoding?: BufferEncoding): Buffer | string;
|
|
11
|
+
setPublicKey(publicKey: Buffer | string, encoding?: BufferEncoding): void;
|
|
12
|
+
setPrivateKey(privateKey: Buffer | string, encoding?: BufferEncoding): void;
|
|
13
|
+
get verifyError(): number;
|
|
14
|
+
}
|
|
15
|
+
export declare function createDiffieHellman(primeOrSize: number | string | Buffer, primeEncodingOrGenerator?: string | number | Buffer, generator?: number | string | Buffer, _generatorEncoding?: string): DiffieHellman;
|
|
16
|
+
export declare function getDiffieHellman(groupName: string): DiffieHellman;
|
|
17
|
+
export { getDiffieHellman as createDiffieHellmanGroup };
|
|
18
|
+
//# sourceMappingURL=diffie-hellman.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
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EAAE,MAAM,GAC1B,aAAa,CA6Df;AAED,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,CAOjE;AAED,OAAO,EAAE,gBAAgB,IAAI,wBAAwB,EAAE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
2
|
+
import { PublicKeyObject, PrivateKeyObject } from './keys/classes';
|
|
3
|
+
import type { DsaKeyPair } from './specs/dsaKeyPair.nitro';
|
|
4
|
+
import type { GenerateKeyPairOptions, KeyPairGenConfig } from './utils/types';
|
|
5
|
+
export declare class Dsa {
|
|
6
|
+
native: DsaKeyPair;
|
|
7
|
+
constructor(modulusLength: number, divisorLength?: number);
|
|
8
|
+
generateKeyPair(): Promise<void>;
|
|
9
|
+
generateKeyPairSync(): void;
|
|
10
|
+
}
|
|
11
|
+
export declare function dsa_generateKeyPairNode(options: GenerateKeyPairOptions | undefined, encoding: KeyPairGenConfig): Promise<{
|
|
12
|
+
publicKey: PublicKeyObject | Buffer | string | ArrayBuffer;
|
|
13
|
+
privateKey: PrivateKeyObject | Buffer | string | ArrayBuffer;
|
|
14
|
+
}>;
|
|
15
|
+
export declare function dsa_generateKeyPairNodeSync(options: GenerateKeyPairOptions | undefined, encoding: KeyPairGenConfig): {
|
|
16
|
+
publicKey: PublicKeyObject | Buffer | string | ArrayBuffer;
|
|
17
|
+
privateKey: PrivateKeyObject | Buffer | string | ArrayBuffer;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=dsa.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dsa.d.ts","sourceRoot":"","sources":["../../src/dsa.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAa,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAG9E,qBAAa,GAAG;IACd,MAAM,EAAE,UAAU,CAAC;gBAEP,aAAa,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM;IAQnD,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAItC,mBAAmB,IAAI,IAAI;CAG5B;AAkGD,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,sBAAsB,GAAG,SAAS,EAC3C,QAAQ,EAAE,gBAAgB,GACzB,OAAO,CAAC;IACT,SAAS,EAAE,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;IAC3D,UAAU,EAAE,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;CAC9D,CAAC,CAID;AAED,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,sBAAsB,GAAG,SAAS,EAC3C,QAAQ,EAAE,gBAAgB,GACzB;IACD,SAAS,EAAE,eAAe,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;IAC3D,UAAU,EAAE,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;CAC9D,CAIA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { EcKeyPair } from './specs/ecKeyPair.nitro';
|
|
2
|
+
import { CryptoKey, PublicKeyObject, PrivateKeyObject } from './keys/classes';
|
|
3
|
+
import type { CryptoKeyPair, KeyPairOptions, KeyUsage, SubtleAlgorithm, BufferLike, BinaryLike, JWK, ImportFormat, GenerateKeyPairOptions, KeyPairGenConfig } from './utils/types';
|
|
4
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
5
|
+
export declare function getCurves(): string[];
|
|
6
|
+
export declare class Ec {
|
|
7
|
+
native: EcKeyPair;
|
|
8
|
+
constructor(curve: string);
|
|
9
|
+
generateKeyPair(): Promise<CryptoKeyPair>;
|
|
10
|
+
generateKeyPairSync(): CryptoKeyPair;
|
|
11
|
+
}
|
|
12
|
+
export declare function ecImportKey(format: ImportFormat, keyData: BufferLike | BinaryLike | JWK, algorithm: SubtleAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): CryptoKey;
|
|
13
|
+
export declare const ecdsaSignVerify: (key: CryptoKey, data: BufferLike, { hash }: SubtleAlgorithm, signature?: BufferLike) => ArrayBuffer | boolean;
|
|
14
|
+
export declare function ec_generateKeyPair(name: string, namedCurve: string, extractable: boolean, keyUsages: KeyUsage[], _options?: KeyPairOptions): Promise<CryptoKeyPair>;
|
|
15
|
+
export declare function ec_generateKeyPairNode(options: GenerateKeyPairOptions | undefined, encoding: KeyPairGenConfig): Promise<{
|
|
16
|
+
publicKey: PublicKeyObject | Buffer | string | ArrayBuffer;
|
|
17
|
+
privateKey: PrivateKeyObject | Buffer | string | ArrayBuffer;
|
|
18
|
+
}>;
|
|
19
|
+
export declare function ec_generateKeyPairNodeSync(options: GenerateKeyPairOptions | undefined, encoding: KeyPairGenConfig): {
|
|
20
|
+
publicKey: PublicKeyObject | Buffer | string | ArrayBuffer;
|
|
21
|
+
privateKey: PrivateKeyObject | Buffer | string | ArrayBuffer;
|
|
22
|
+
};
|
|
23
|
+
export declare function ecDeriveBits(algorithm: SubtleAlgorithm, baseKey: CryptoKey, length: number | null): ArrayBuffer;
|
|
24
|
+
//# sourceMappingURL=ec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ec.d.ts","sourceRoot":"","sources":["../../src/ec.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,EACL,SAAS,EAET,eAAe,EACf,gBAAgB,EACjB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,QAAQ,EACR,eAAe,EACf,UAAU,EACV,UAAU,EACV,GAAG,EACH,YAAY,EAEZ,sBAAsB,EACtB,gBA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,EAAE,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,WAAW,CAAC;CAC9D,CAIA;AAED,wBAAgB,YAAY,CAC1B,SAAS,EAAE,eAAe,EAC1B,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,MAAM,GAAG,IAAI,GACpB,WAAW,CAqDb"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
2
|
+
export declare class ECDH {
|
|
3
|
+
private static _convertKeyHybrid;
|
|
4
|
+
private static get convertKeyHybrid();
|
|
5
|
+
private _hybrid;
|
|
6
|
+
constructor(curveName: string);
|
|
7
|
+
generateKeys(): Buffer;
|
|
8
|
+
computeSecret(otherPublicKey: Buffer | string | {
|
|
9
|
+
code: number;
|
|
10
|
+
byteLength: number;
|
|
11
|
+
}, inputEncoding?: BufferEncoding): Buffer;
|
|
12
|
+
getPrivateKey(): Buffer;
|
|
13
|
+
setPrivateKey(privateKey: Buffer | string, encoding?: BufferEncoding): void;
|
|
14
|
+
getPublicKey(encoding?: BufferEncoding): Buffer | string;
|
|
15
|
+
setPublicKey(publicKey: Buffer | string, encoding?: BufferEncoding): void;
|
|
16
|
+
static convertKey(key: Buffer | string, curve: string, inputEncoding?: BufferEncoding, outputEncoding?: BufferEncoding, format?: 'uncompressed' | 'compressed' | 'hybrid'): Buffer | string;
|
|
17
|
+
}
|
|
18
|
+
export declare function createECDH(curveName: string): ECDH;
|
|
19
|
+
//# sourceMappingURL=ecdh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ecdh.d.ts","sourceRoot":"","sources":["../../src/ecdh.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAOxD,qBAAa,IAAI;IACf,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAA4B;IAC5D,OAAO,CAAC,MAAM,KAAK,gBAAgB,GAMlC;IAED,OAAO,CAAC,OAAO,CAAgB;gBAEnB,SAAS,EAAE,MAAM;IAK7B,YAAY,IAAI,MAAM;IAKtB,aAAa,CACX,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,EACtE,aAAa,CAAC,EAAE,cAAc,GAC7B,MAAM;IAgBT,aAAa,IAAI,MAAM;IAIvB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,IAAI;IAU3E,YAAY,CAAC,QAAQ,CAAC,EAAE,cAAc,GAAG,MAAM,GAAG,MAAM;IAYxD,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,CAAC,EAAE,cAAc,GAAG,IAAI;IAUzE,MAAM,CAAC,UAAU,CACf,GAAG,EAAE,MAAM,GAAG,MAAM,EACpB,KAAK,EAAE,MAAM,EACb,aAAa,CAAC,EAAE,cAAc,EAC9B,cAAc,CAAC,EAAE,cAAc,EAC/B,MAAM,CAAC,EAAE,cAAc,GAAG,YAAY,GAAG,QAAQ,GAChD,MAAM,GAAG,MAAM;CAmCnB;AAED,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAElD"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
2
|
+
import { CryptoKey } from './keys/classes';
|
|
3
|
+
import type { EdKeyPair } from './specs/edKeyPair.nitro';
|
|
4
|
+
import type { BinaryLike, CFRGKeyPairType, CryptoKeyPair, DiffieHellmanCallback, DiffieHellmanOptions, GenerateKeyPairCallback, GenerateKeyPairReturn, Hex, KeyPairGenConfig, KeyUsage, SubtleAlgorithm } from './utils';
|
|
5
|
+
export declare class Ed {
|
|
6
|
+
type: CFRGKeyPairType;
|
|
7
|
+
config: KeyPairGenConfig;
|
|
8
|
+
native: EdKeyPair;
|
|
9
|
+
constructor(type: CFRGKeyPairType, config: KeyPairGenConfig);
|
|
10
|
+
/**
|
|
11
|
+
* Computes the Diffie-Hellman secret based on a privateKey and a publicKey.
|
|
12
|
+
* Both keys must have the same asymmetricKeyType, which must be one of 'dh'
|
|
13
|
+
* (for Diffie-Hellman), 'ec', 'x448', or 'x25519' (for ECDH).
|
|
14
|
+
*
|
|
15
|
+
* @api nodejs/node
|
|
16
|
+
*
|
|
17
|
+
* @param options `{ privateKey, publicKey }`, both of which are `KeyObject`s
|
|
18
|
+
* @param callback optional `(err, secret) => void`
|
|
19
|
+
* @returns `Buffer` if no callback, or `void` if callback is provided
|
|
20
|
+
*/
|
|
21
|
+
diffieHellman(options: DiffieHellmanOptions, callback?: DiffieHellmanCallback): Buffer | void;
|
|
22
|
+
generateKeyPair(): Promise<void>;
|
|
23
|
+
generateKeyPairSync(): void;
|
|
24
|
+
getPublicKey(): ArrayBuffer;
|
|
25
|
+
getPrivateKey(): ArrayBuffer;
|
|
26
|
+
/**
|
|
27
|
+
* Computes the Diffie-Hellman shared secret based on a privateKey and a
|
|
28
|
+
* publicKey for key exchange
|
|
29
|
+
*
|
|
30
|
+
* @api \@paulmillr/noble-curves/ed25519
|
|
31
|
+
*
|
|
32
|
+
* @param privateKey
|
|
33
|
+
* @param publicKey
|
|
34
|
+
* @returns shared secret key
|
|
35
|
+
*/
|
|
36
|
+
getSharedSecret(privateKey: Hex, publicKey: Hex): ArrayBuffer;
|
|
37
|
+
sign(message: BinaryLike, key?: BinaryLike): Promise<ArrayBuffer>;
|
|
38
|
+
signSync(message: BinaryLike, key?: BinaryLike): ArrayBuffer;
|
|
39
|
+
verify(signature: BinaryLike, message: BinaryLike, key?: BinaryLike): Promise<boolean>;
|
|
40
|
+
verifySync(signature: BinaryLike, message: BinaryLike, key?: BinaryLike): boolean;
|
|
41
|
+
}
|
|
42
|
+
export declare function diffieHellman(options: DiffieHellmanOptions, callback?: DiffieHellmanCallback): Buffer | void;
|
|
43
|
+
export declare function ed_generateKeyPair(isAsync: boolean, type: CFRGKeyPairType, encoding: KeyPairGenConfig, callback: GenerateKeyPairCallback | undefined): GenerateKeyPairReturn | void;
|
|
44
|
+
export declare function ed_generateKeyPairWebCrypto(type: 'ed25519' | 'ed448', extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
|
|
45
|
+
export declare function x_generateKeyPairWebCrypto(type: 'x25519' | 'x448', extractable: boolean, keyUsages: KeyUsage[]): Promise<CryptoKeyPair>;
|
|
46
|
+
export declare function xDeriveBits(algorithm: SubtleAlgorithm, baseKey: CryptoKey, length: number | null): ArrayBuffer;
|
|
47
|
+
//# sourceMappingURL=ed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ed.d.ts","sourceRoot":"","sources":["../../src/ed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAExD,OAAO,EACL,SAAS,EAIV,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAEzD,OAAO,KAAK,EACV,UAAU,EACV,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,qBAAqB,EACrB,GAAG,EACH,gBAAgB,EAChB,QAAQ,EACR,eAAe,EAChB,MAAM,SAAS,CAAC;AAejB,qBAAa,EAAE;IACb,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,gBAAgB,CAAC;IACzB,MAAM,EAAE,SAAS,CAAC;gBAEN,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,gBAAgB;IAO3D;;;;;;;;;;OAUG;IACH,aAAa,CACX,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,CAAC,EAAE,qBAAqB,GAC/B,MAAM,GAAG,IAAI;IA2BV,eAAe,IAAI,OAAO,CAAC,IAAI,CAAC;IAWtC,mBAAmB,IAAI,IAAI;IAW3B,YAAY,IAAI,WAAW;IAI3B,aAAa,IAAI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|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"@types.d.ts","sourceRoot":"","sources":["../../../src/expo-plugin/@types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG;IACxB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withRNQC.d.ts","sourceRoot":"","sources":["../../../src/expo-plugin/withRNQC.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAkB5C,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,6BAE7D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withSodiumAndroid.d.ts","sourceRoot":"","sources":["../../../src/expo-plugin/withSodiumAndroid.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,WAAW,CAmBvD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withSodiumIos.d.ts","sourceRoot":"","sources":["../../../src/expo-plugin/withSodiumIos.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAIxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,eAAO,MAAM,aAAa,EAAE,YAAY,CAAC,WAAW,CAkBnD,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ConfigPlugin } from 'expo/config-plugins';
|
|
2
|
+
import type { ConfigProps } from './@types';
|
|
3
|
+
/**
|
|
4
|
+
* True when `version` is absent or below our minimum, i.e. we should raise it.
|
|
5
|
+
* Compared component-wise: '16.10' and '16.4.1' are both above '16.4'.
|
|
6
|
+
*/
|
|
7
|
+
export declare function needsRaising(version: string | undefined): boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Fallback for Podfiles whose post_install doesn't already pin a deployment
|
|
10
|
+
* target. No-op when one is already pinned - that's the app's call, not ours.
|
|
11
|
+
*/
|
|
12
|
+
export declare function patchPodfile(contents: string): string;
|
|
13
|
+
/**
|
|
14
|
+
* Workaround for some jank XCode releases that break React Native native modules
|
|
15
|
+
*
|
|
16
|
+
* see: https://github.com/mrousavy/nitro/issues/422#issuecomment-2545988256
|
|
17
|
+
*
|
|
18
|
+
* Raises the iOS deployment target to our minimum wherever it is lower. Reads
|
|
19
|
+
* the value at mod time rather than from static `plugins` config, so it floors
|
|
20
|
+
* apps that set a higher target by any means and never lowers one. (#1066)
|
|
21
|
+
*/
|
|
22
|
+
export declare const withXCode: ConfigPlugin<ConfigProps>;
|
|
23
|
+
//# sourceMappingURL=withXCode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"withXCode.d.ts","sourceRoot":"","sources":["../../../src/expo-plugin/withXCode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAa5C;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAgBjE;AAcD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAiBrD;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,EAAE,YAAY,CAAC,WAAW,CAqD/C,CAAC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { Stream } from 'readable-stream';
|
|
2
|
+
import type { TransformOptions } from 'readable-stream';
|
|
3
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
4
|
+
import type { BinaryLike, Encoding, BufferLike, SubtleAlgorithm } from './utils';
|
|
5
|
+
export declare function getHashes(): string[];
|
|
6
|
+
interface HashOptions extends TransformOptions {
|
|
7
|
+
/**
|
|
8
|
+
* For XOF hash functions such as `shake256`, the
|
|
9
|
+
* outputLength option can be used to specify the desired output length in bytes.
|
|
10
|
+
*/
|
|
11
|
+
outputLength?: number | undefined;
|
|
12
|
+
}
|
|
13
|
+
declare class Hash extends Stream.Transform {
|
|
14
|
+
private algorithm;
|
|
15
|
+
private options;
|
|
16
|
+
private native;
|
|
17
|
+
private validate;
|
|
18
|
+
/**
|
|
19
|
+
* @internal use `createHash()` instead
|
|
20
|
+
*/
|
|
21
|
+
private constructor();
|
|
22
|
+
/**
|
|
23
|
+
* Updates the hash content with the given `data`, the encoding of which
|
|
24
|
+
* is given in `inputEncoding`.
|
|
25
|
+
* If `encoding` is not provided, and the `data` is a string, an
|
|
26
|
+
* encoding of `'utf8'` is enforced. If `data` is a `Buffer`, `TypedArray`, or`DataView`, then `inputEncoding` is ignored.
|
|
27
|
+
*
|
|
28
|
+
* This can be called many times with new data as it is streamed.
|
|
29
|
+
* @since v1.0.0
|
|
30
|
+
* @param inputEncoding The `encoding` of the `data` string.
|
|
31
|
+
*/
|
|
32
|
+
update(data: BinaryLike): Hash;
|
|
33
|
+
update(data: BinaryLike, inputEncoding: Encoding): Buffer;
|
|
34
|
+
/**
|
|
35
|
+
* Calculates the digest of all of the data passed to be hashed (using the `hash.update()` method).
|
|
36
|
+
* If `encoding` is provided a string will be returned; otherwise
|
|
37
|
+
* a `Buffer` is returned.
|
|
38
|
+
*
|
|
39
|
+
* The `Hash` object can not be used again after `hash.digest()` method has been
|
|
40
|
+
* called. Multiple calls will cause an error to be thrown.
|
|
41
|
+
* @since v1.0.0
|
|
42
|
+
* @param encoding The `encoding` of the return value.
|
|
43
|
+
*/
|
|
44
|
+
digest(): Buffer;
|
|
45
|
+
digest(encoding: Encoding): string;
|
|
46
|
+
/**
|
|
47
|
+
* Creates a new `Hash` object that contains a deep copy of the internal state
|
|
48
|
+
* of the current `Hash` object.
|
|
49
|
+
*
|
|
50
|
+
* The optional `options` argument controls stream behavior. For XOF hash
|
|
51
|
+
* functions such as `'shake256'`, the `outputLength` option can be used to
|
|
52
|
+
* specify the desired output length in bytes.
|
|
53
|
+
*
|
|
54
|
+
* An error is thrown when an attempt is made to copy the `Hash` object after
|
|
55
|
+
* its `hash.digest()` method has been called.
|
|
56
|
+
*
|
|
57
|
+
* ```js
|
|
58
|
+
* // Calculate a rolling hash.
|
|
59
|
+
* import { createHash } from 'react-native-quick-crypto';
|
|
60
|
+
*
|
|
61
|
+
* const hash = createHash('sha256');
|
|
62
|
+
*
|
|
63
|
+
* hash.update('one');
|
|
64
|
+
* console.log(hash.copy().digest('hex'));
|
|
65
|
+
*
|
|
66
|
+
* hash.update('two');
|
|
67
|
+
* console.log(hash.copy().digest('hex'));
|
|
68
|
+
*
|
|
69
|
+
* hash.update('three');
|
|
70
|
+
* console.log(hash.copy().digest('hex'));
|
|
71
|
+
*
|
|
72
|
+
* // Etc.
|
|
73
|
+
* ```
|
|
74
|
+
* @since v1.0.0
|
|
75
|
+
* @param options `stream.transform` options
|
|
76
|
+
*/
|
|
77
|
+
copy(): Hash;
|
|
78
|
+
copy(options: HashOptions): Hash;
|
|
79
|
+
/**
|
|
80
|
+
* Returns the OpenSSL version string
|
|
81
|
+
* @since v1.0.0
|
|
82
|
+
*/
|
|
83
|
+
getOpenSSLVersion(): string;
|
|
84
|
+
_transform(chunk: BinaryLike, encoding: BufferEncoding, callback: (err?: Error | null) => void): void;
|
|
85
|
+
_flush(callback: (err?: Error | null) => void): void;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Creates and returns a `Hash` object that can be used to generate hash digests
|
|
89
|
+
* using the given `algorithm`. Optional `options` argument controls stream
|
|
90
|
+
* behavior. For XOF hash functions such as `'shake256'`, the `outputLength` option
|
|
91
|
+
* can be used to specify the desired output length in bytes.
|
|
92
|
+
*
|
|
93
|
+
* The `algorithm` is dependent on the available algorithms supported by the
|
|
94
|
+
* version of OpenSSL on the platform. Examples are `'sha256'`, `'sha512'`, etc.
|
|
95
|
+
* On recent releases of OpenSSL, `openssl list -digest-algorithms` will
|
|
96
|
+
* display the available digest algorithms.
|
|
97
|
+
*
|
|
98
|
+
* Example: generating the sha256 sum of a file
|
|
99
|
+
*
|
|
100
|
+
* ```js
|
|
101
|
+
* import crypto from 'react-native-quick-crypto';
|
|
102
|
+
*
|
|
103
|
+
* const hash = crypto.createHash('sha256').update('Test123').digest('hex');
|
|
104
|
+
* console.log('SHA-256 of "Test123":', hash);
|
|
105
|
+
* ```
|
|
106
|
+
* @since v1.0.0
|
|
107
|
+
* @param options `stream.transform` options
|
|
108
|
+
*/
|
|
109
|
+
export declare function createHash(algorithm: string, options?: HashOptions): Hash;
|
|
110
|
+
/**
|
|
111
|
+
* Asynchronous digest function for WebCrypto SubtleCrypto API
|
|
112
|
+
* @param algorithm The hash algorithm to use
|
|
113
|
+
* @param data The data to hash
|
|
114
|
+
* @returns Promise resolving to the hash digest as ArrayBuffer
|
|
115
|
+
*/
|
|
116
|
+
export declare const asyncDigest: (algorithm: SubtleAlgorithm, data: BufferLike) => Promise<ArrayBuffer>;
|
|
117
|
+
export declare function hash(algorithm: string, data: BinaryLike, outputEncoding: Encoding): string;
|
|
118
|
+
export declare function hash(algorithm: string, data: BinaryLike): Buffer;
|
|
119
|
+
export declare const hashExports: {
|
|
120
|
+
createHash: typeof createHash;
|
|
121
|
+
getHashes: typeof getHashes;
|
|
122
|
+
hash: typeof hash;
|
|
123
|
+
asyncDigest: (algorithm: SubtleAlgorithm, data: BufferLike) => Promise<ArrayBuffer>;
|
|
124
|
+
};
|
|
125
|
+
export {};
|
|
126
|
+
//# sourceMappingURL=hash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
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