@hxa-rn/react-native-quick-crypto 1.1.0-beta.1
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/LICENSE +21 -0
- package/README.md +171 -0
- package/dist/commonjs/argon2.js +39 -0
- package/dist/commonjs/argon2.js.map +1 -0
- package/dist/commonjs/blake3.js +106 -0
- package/dist/commonjs/blake3.js.map +1 -0
- package/dist/commonjs/certificate.js +35 -0
- package/dist/commonjs/certificate.js.map +1 -0
- package/dist/commonjs/cipher.js +202 -0
- package/dist/commonjs/cipher.js.map +1 -0
- package/dist/commonjs/constants.js +32 -0
- package/dist/commonjs/constants.js.map +1 -0
- package/dist/commonjs/dh-groups.js +29 -0
- package/dist/commonjs/dh-groups.js.map +1 -0
- package/dist/commonjs/dhKeyPair.js +113 -0
- package/dist/commonjs/dhKeyPair.js.map +1 -0
- package/dist/commonjs/diffie-hellman.js +155 -0
- package/dist/commonjs/diffie-hellman.js.map +1 -0
- package/dist/commonjs/dsa.js +96 -0
- package/dist/commonjs/dsa.js.map +1 -0
- package/dist/commonjs/ec.js +368 -0
- package/dist/commonjs/ec.js.map +1 -0
- package/dist/commonjs/ecdh.js +114 -0
- package/dist/commonjs/ecdh.js.map +1 -0
- package/dist/commonjs/ed.js +395 -0
- package/dist/commonjs/ed.js.map +1 -0
- package/dist/commonjs/expo-plugin/@types.js +2 -0
- package/dist/commonjs/expo-plugin/@types.js.map +1 -0
- package/dist/commonjs/expo-plugin/withRNQC.js +25 -0
- package/dist/commonjs/expo-plugin/withRNQC.js.map +1 -0
- package/dist/commonjs/expo-plugin/withSodiumAndroid.js +25 -0
- package/dist/commonjs/expo-plugin/withSodiumAndroid.js.map +1 -0
- package/dist/commonjs/expo-plugin/withSodiumIos.js +23 -0
- package/dist/commonjs/expo-plugin/withSodiumIos.js.map +1 -0
- package/dist/commonjs/expo-plugin/withXCode.js +51 -0
- package/dist/commonjs/expo-plugin/withXCode.js.map +1 -0
- package/dist/commonjs/hash.js +241 -0
- package/dist/commonjs/hash.js.map +1 -0
- package/dist/commonjs/hkdf.js +81 -0
- package/dist/commonjs/hkdf.js.map +1 -0
- package/dist/commonjs/hmac.js +121 -0
- package/dist/commonjs/hmac.js.map +1 -0
- package/dist/commonjs/index.js +358 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/keys/classes.js +272 -0
- package/dist/commonjs/keys/classes.js.map +1 -0
- package/dist/commonjs/keys/generateKeyPair.js +156 -0
- package/dist/commonjs/keys/generateKeyPair.js.map +1 -0
- package/dist/commonjs/keys/index.js +327 -0
- package/dist/commonjs/keys/index.js.map +1 -0
- package/dist/commonjs/keys/publicCipher.js +165 -0
- package/dist/commonjs/keys/publicCipher.js.map +1 -0
- package/dist/commonjs/keys/signVerify.js +225 -0
- package/dist/commonjs/keys/signVerify.js.map +1 -0
- package/dist/commonjs/keys/utils.js +123 -0
- package/dist/commonjs/keys/utils.js.map +1 -0
- package/dist/commonjs/mldsa.js +74 -0
- package/dist/commonjs/mldsa.js.map +1 -0
- package/dist/commonjs/mlkem.js +224 -0
- package/dist/commonjs/mlkem.js.map +1 -0
- package/dist/commonjs/pbkdf2.js +106 -0
- package/dist/commonjs/pbkdf2.js.map +1 -0
- package/dist/commonjs/prime.js +96 -0
- package/dist/commonjs/prime.js.map +1 -0
- package/dist/commonjs/random.js +233 -0
- package/dist/commonjs/random.js.map +1 -0
- package/dist/commonjs/rsa.js +207 -0
- package/dist/commonjs/rsa.js.map +1 -0
- package/dist/commonjs/scrypt.js +98 -0
- package/dist/commonjs/scrypt.js.map +1 -0
- package/dist/commonjs/specs/v1/NativeQuickCrypto.js +17 -0
- package/dist/commonjs/specs/v1/NativeQuickCrypto.js.map +1 -0
- package/dist/commonjs/specs/v1/argon2.nitro.js +6 -0
- package/dist/commonjs/specs/v1/argon2.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/blake3.nitro.js +6 -0
- package/dist/commonjs/specs/v1/blake3.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/certificate.nitro.js +6 -0
- package/dist/commonjs/specs/v1/certificate.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/cipher.nitro.js +6 -0
- package/dist/commonjs/specs/v1/cipher.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/dhKeyPair.nitro.js +6 -0
- package/dist/commonjs/specs/v1/dhKeyPair.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/diffie-hellman.nitro.js +6 -0
- package/dist/commonjs/specs/v1/diffie-hellman.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/dsaKeyPair.nitro.js +6 -0
- package/dist/commonjs/specs/v1/dsaKeyPair.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/ecKeyPair.nitro.js +6 -0
- package/dist/commonjs/specs/v1/ecKeyPair.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/ecdh.nitro.js +6 -0
- package/dist/commonjs/specs/v1/ecdh.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/edKeyPair.nitro.js +6 -0
- package/dist/commonjs/specs/v1/edKeyPair.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/hash.nitro.js +6 -0
- package/dist/commonjs/specs/v1/hash.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/hkdf.nitro.js +6 -0
- package/dist/commonjs/specs/v1/hkdf.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/hmac.nitro.js +6 -0
- package/dist/commonjs/specs/v1/hmac.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/keyObjectHandle.nitro.js +6 -0
- package/dist/commonjs/specs/v1/keyObjectHandle.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/kmac.nitro.js +6 -0
- package/dist/commonjs/specs/v1/kmac.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/mlDsaKeyPair.nitro.js +6 -0
- package/dist/commonjs/specs/v1/mlDsaKeyPair.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/mlKemKeyPair.nitro.js +6 -0
- package/dist/commonjs/specs/v1/mlKemKeyPair.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/pbkdf2.nitro.js +6 -0
- package/dist/commonjs/specs/v1/pbkdf2.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/prime.nitro.js +6 -0
- package/dist/commonjs/specs/v1/prime.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/random.nitro.js +6 -0
- package/dist/commonjs/specs/v1/random.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/rsaCipher.nitro.js +6 -0
- package/dist/commonjs/specs/v1/rsaCipher.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/rsaKeyPair.nitro.js +6 -0
- package/dist/commonjs/specs/v1/rsaKeyPair.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/scrypt.nitro.js +6 -0
- package/dist/commonjs/specs/v1/scrypt.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/sign.nitro.js +6 -0
- package/dist/commonjs/specs/v1/sign.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/utils.nitro.js +6 -0
- package/dist/commonjs/specs/v1/utils.nitro.js.map +1 -0
- package/dist/commonjs/specs/v1/x509certificate.nitro.js +6 -0
- package/dist/commonjs/specs/v1/x509certificate.nitro.js.map +1 -0
- package/dist/commonjs/subtle.js +1811 -0
- package/dist/commonjs/subtle.js.map +1 -0
- package/dist/commonjs/utils/cipher.js +64 -0
- package/dist/commonjs/utils/cipher.js.map +1 -0
- package/dist/commonjs/utils/conversion.js +181 -0
- package/dist/commonjs/utils/conversion.js.map +1 -0
- package/dist/commonjs/utils/errors.js +14 -0
- package/dist/commonjs/utils/errors.js.map +1 -0
- package/dist/commonjs/utils/hashnames.js +122 -0
- package/dist/commonjs/utils/hashnames.js.map +1 -0
- package/dist/commonjs/utils/index.js +83 -0
- package/dist/commonjs/utils/index.js.map +1 -0
- package/dist/commonjs/utils/noble.js +82 -0
- package/dist/commonjs/utils/noble.js.map +1 -0
- package/dist/commonjs/utils/timingSafeEqual.js +24 -0
- package/dist/commonjs/utils/timingSafeEqual.js.map +1 -0
- package/dist/commonjs/utils/types.js +55 -0
- package/dist/commonjs/utils/types.js.map +1 -0
- package/dist/commonjs/utils/validation.js +98 -0
- package/dist/commonjs/utils/validation.js.map +1 -0
- package/dist/commonjs/x509certificate.js +193 -0
- package/dist/commonjs/x509certificate.js.map +1 -0
- package/dist/module/argon2.js +32 -0
- package/dist/module/argon2.js.map +1 -0
- package/dist/module/blake3.js +96 -0
- package/dist/module/blake3.js.map +1 -0
- package/dist/module/certificate.js +28 -0
- package/dist/module/certificate.js.map +1 -0
- package/dist/module/cipher.js +194 -0
- package/dist/module/cipher.js.map +1 -0
- package/dist/module/constants.js +26 -0
- package/dist/module/constants.js.map +1 -0
- package/dist/module/dh-groups.js +23 -0
- package/dist/module/dh-groups.js.map +1 -0
- package/dist/module/dhKeyPair.js +104 -0
- package/dist/module/dhKeyPair.js.map +1 -0
- package/dist/module/diffie-hellman.js +147 -0
- package/dist/module/diffie-hellman.js.map +1 -0
- package/dist/module/dsa.js +87 -0
- package/dist/module/dsa.js.map +1 -0
- package/dist/module/ec.js +354 -0
- package/dist/module/ec.js.map +1 -0
- package/dist/module/ecdh.js +106 -0
- package/dist/module/ecdh.js.map +1 -0
- package/dist/module/ed.js +383 -0
- package/dist/module/ed.js.map +1 -0
- package/dist/module/expo-plugin/@types.js +2 -0
- package/dist/module/expo-plugin/@types.js.map +1 -0
- package/dist/module/expo-plugin/withRNQC.js +19 -0
- package/dist/module/expo-plugin/withRNQC.js.map +1 -0
- package/dist/module/expo-plugin/withSodiumAndroid.js +18 -0
- package/dist/module/expo-plugin/withSodiumAndroid.js.map +1 -0
- package/dist/module/expo-plugin/withSodiumIos.js +15 -0
- package/dist/module/expo-plugin/withSodiumIos.js.map +1 -0
- package/dist/module/expo-plugin/withXCode.js +44 -0
- package/dist/module/expo-plugin/withXCode.js.map +1 -0
- package/dist/module/hash.js +230 -0
- package/dist/module/hash.js.map +1 -0
- package/dist/module/hkdf.js +73 -0
- package/dist/module/hkdf.js.map +1 -0
- package/dist/module/hmac.js +114 -0
- package/dist/module/hmac.js.map +1 -0
- package/dist/module/index.js +134 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/keys/classes.js +261 -0
- package/dist/module/keys/classes.js.map +1 -0
- package/dist/module/keys/generateKeyPair.js +148 -0
- package/dist/module/keys/generateKeyPair.js.map +1 -0
- package/dist/module/keys/index.js +190 -0
- package/dist/module/keys/index.js.map +1 -0
- package/dist/module/keys/publicCipher.js +156 -0
- package/dist/module/keys/publicCipher.js.map +1 -0
- package/dist/module/keys/signVerify.js +213 -0
- package/dist/module/keys/signVerify.js.map +1 -0
- package/dist/module/keys/utils.js +112 -0
- package/dist/module/keys/utils.js.map +1 -0
- package/dist/module/mldsa.js +66 -0
- package/dist/module/mldsa.js.map +1 -0
- package/dist/module/mlkem.js +214 -0
- package/dist/module/mlkem.js.map +1 -0
- package/dist/module/pbkdf2.js +98 -0
- package/dist/module/pbkdf2.js.map +1 -0
- package/dist/module/prime.js +87 -0
- package/dist/module/prime.js.map +1 -0
- package/dist/module/random.js +220 -0
- package/dist/module/random.js.map +1 -0
- package/dist/module/rsa.js +197 -0
- package/dist/module/rsa.js.map +1 -0
- package/dist/module/scrypt.js +91 -0
- package/dist/module/scrypt.js.map +1 -0
- package/dist/module/specs/v1/NativeQuickCrypto.js +13 -0
- package/dist/module/specs/v1/NativeQuickCrypto.js.map +1 -0
- package/dist/module/specs/v1/argon2.nitro.js +2 -0
- package/dist/module/specs/v1/argon2.nitro.js.map +1 -0
- package/dist/module/specs/v1/blake3.nitro.js +2 -0
- package/dist/module/specs/v1/blake3.nitro.js.map +1 -0
- package/dist/module/specs/v1/certificate.nitro.js +2 -0
- package/dist/module/specs/v1/certificate.nitro.js.map +1 -0
- package/dist/module/specs/v1/cipher.nitro.js +2 -0
- package/dist/module/specs/v1/cipher.nitro.js.map +1 -0
- package/dist/module/specs/v1/dhKeyPair.nitro.js +2 -0
- package/dist/module/specs/v1/dhKeyPair.nitro.js.map +1 -0
- package/dist/module/specs/v1/diffie-hellman.nitro.js +2 -0
- package/dist/module/specs/v1/diffie-hellman.nitro.js.map +1 -0
- package/dist/module/specs/v1/dsaKeyPair.nitro.js +2 -0
- package/dist/module/specs/v1/dsaKeyPair.nitro.js.map +1 -0
- package/dist/module/specs/v1/ecKeyPair.nitro.js +2 -0
- package/dist/module/specs/v1/ecKeyPair.nitro.js.map +1 -0
- package/dist/module/specs/v1/ecdh.nitro.js +2 -0
- package/dist/module/specs/v1/ecdh.nitro.js.map +1 -0
- package/dist/module/specs/v1/edKeyPair.nitro.js +2 -0
- package/dist/module/specs/v1/edKeyPair.nitro.js.map +1 -0
- package/dist/module/specs/v1/hash.nitro.js +2 -0
- package/dist/module/specs/v1/hash.nitro.js.map +1 -0
- package/dist/module/specs/v1/hkdf.nitro.js +2 -0
- package/dist/module/specs/v1/hkdf.nitro.js.map +1 -0
- package/dist/module/specs/v1/hmac.nitro.js +2 -0
- package/dist/module/specs/v1/hmac.nitro.js.map +1 -0
- package/dist/module/specs/v1/keyObjectHandle.nitro.js +2 -0
- package/dist/module/specs/v1/keyObjectHandle.nitro.js.map +1 -0
- package/dist/module/specs/v1/kmac.nitro.js +2 -0
- package/dist/module/specs/v1/kmac.nitro.js.map +1 -0
- package/dist/module/specs/v1/mlDsaKeyPair.nitro.js +2 -0
- package/dist/module/specs/v1/mlDsaKeyPair.nitro.js.map +1 -0
- package/dist/module/specs/v1/mlKemKeyPair.nitro.js +2 -0
- package/dist/module/specs/v1/mlKemKeyPair.nitro.js.map +1 -0
- package/dist/module/specs/v1/pbkdf2.nitro.js +2 -0
- package/dist/module/specs/v1/pbkdf2.nitro.js.map +1 -0
- package/dist/module/specs/v1/prime.nitro.js +2 -0
- package/dist/module/specs/v1/prime.nitro.js.map +1 -0
- package/dist/module/specs/v1/random.nitro.js +2 -0
- package/dist/module/specs/v1/random.nitro.js.map +1 -0
- package/dist/module/specs/v1/rsaCipher.nitro.js +2 -0
- package/dist/module/specs/v1/rsaCipher.nitro.js.map +1 -0
- package/dist/module/specs/v1/rsaKeyPair.nitro.js +2 -0
- package/dist/module/specs/v1/rsaKeyPair.nitro.js.map +1 -0
- package/dist/module/specs/v1/scrypt.nitro.js +2 -0
- package/dist/module/specs/v1/scrypt.nitro.js.map +1 -0
- package/dist/module/specs/v1/sign.nitro.js +2 -0
- package/dist/module/specs/v1/sign.nitro.js.map +1 -0
- package/dist/module/specs/v1/utils.nitro.js +2 -0
- package/dist/module/specs/v1/utils.nitro.js.map +1 -0
- package/dist/module/specs/v1/x509certificate.nitro.js +2 -0
- package/dist/module/specs/v1/x509certificate.nitro.js.map +1 -0
- package/dist/module/subtle.js +1803 -0
- package/dist/module/subtle.js.map +1 -0
- package/dist/module/utils/cipher.js +54 -0
- package/dist/module/utils/cipher.js.map +1 -0
- package/dist/module/utils/conversion.js +146 -0
- package/dist/module/utils/conversion.js.map +1 -0
- package/dist/module/utils/errors.js +8 -0
- package/dist/module/utils/errors.js.map +1 -0
- package/dist/module/utils/hashnames.js +118 -0
- package/dist/module/utils/hashnames.js.map +1 -0
- package/dist/module/utils/index.js +8 -0
- package/dist/module/utils/index.js.map +1 -0
- package/dist/module/utils/noble.js +74 -0
- package/dist/module/utils/noble.js.map +1 -0
- package/dist/module/utils/timingSafeEqual.js +18 -0
- package/dist/module/utils/timingSafeEqual.js.map +1 -0
- package/dist/module/utils/types.js +55 -0
- package/dist/module/utils/types.js.map +1 -0
- package/dist/module/utils/validation.js +85 -0
- package/dist/module/utils/validation.js.map +1 -0
- package/dist/module/x509certificate.js +186 -0
- package/dist/module/x509certificate.js.map +1 -0
- package/dist/typescript/argon2.d.ts +15 -0
- package/dist/typescript/blake3.d.ts +32 -0
- package/dist/typescript/certificate.d.ts +7 -0
- package/dist/typescript/cipher.d.ts +74 -0
- package/dist/typescript/constants.d.ts +20 -0
- package/dist/typescript/dh-groups.d.ts +4 -0
- package/dist/typescript/dhKeyPair.d.ts +18 -0
- package/dist/typescript/diffie-hellman.d.ts +17 -0
- package/dist/typescript/dsa.d.ts +18 -0
- package/dist/typescript/ec.d.ts +23 -0
- package/dist/typescript/ecdh.d.ts +18 -0
- package/dist/typescript/ed.d.ts +46 -0
- package/dist/typescript/hash.d.ts +125 -0
- package/dist/typescript/hkdf.d.ts +21 -0
- package/dist/typescript/hmac.d.ts +65 -0
- package/dist/typescript/index.d.ts +224 -0
- package/dist/typescript/keys/classes.d.ts +85 -0
- package/dist/typescript/keys/generateKeyPair.d.ts +5 -0
- package/dist/typescript/keys/index.d.ts +23 -0
- package/dist/typescript/keys/publicCipher.d.ts +22 -0
- package/dist/typescript/keys/signVerify.d.ts +34 -0
- package/dist/typescript/keys/utils.d.ts +33 -0
- package/dist/typescript/mldsa.d.ts +17 -0
- package/dist/typescript/mlkem.d.ts +29 -0
- package/dist/typescript/pbkdf2.d.ts +11 -0
- package/dist/typescript/prime.d.ts +18 -0
- package/dist/typescript/random.d.ts +26 -0
- package/dist/typescript/rsa.d.ts +19 -0
- package/dist/typescript/scrypt.d.ts +17 -0
- package/dist/typescript/specs/v1/NativeQuickCrypto.d.ts +17 -0
- package/dist/typescript/specs/v1/argon2.nitro.d.ts +8 -0
- package/dist/typescript/specs/v1/blake3.nitro.d.ts +14 -0
- package/dist/typescript/specs/v1/certificate.nitro.d.ts +9 -0
- package/dist/typescript/specs/v1/cipher.nitro.d.ts +37 -0
- package/dist/typescript/specs/v1/dhKeyPair.nitro.d.ts +13 -0
- package/dist/typescript/specs/v1/diffie-hellman.nitro.d.ts +17 -0
- package/dist/typescript/specs/v1/dsaKeyPair.nitro.d.ts +12 -0
- package/dist/typescript/specs/v1/ecKeyPair.nitro.d.ts +20 -0
- package/dist/typescript/specs/v1/ecdh.nitro.d.ts +14 -0
- package/dist/typescript/specs/v1/edKeyPair.nitro.d.ts +16 -0
- package/dist/typescript/specs/v1/hash.nitro.d.ts +12 -0
- package/dist/typescript/specs/v1/hkdf.nitro.d.ts +8 -0
- package/dist/typescript/specs/v1/hmac.nitro.d.ts +9 -0
- package/dist/typescript/specs/v1/keyObjectHandle.nitro.d.ts +17 -0
- package/dist/typescript/specs/v1/kmac.nitro.d.ts +9 -0
- package/dist/typescript/specs/v1/mlDsaKeyPair.nitro.d.ts +15 -0
- package/dist/typescript/specs/v1/mlKemKeyPair.nitro.d.ts +17 -0
- package/dist/typescript/specs/v1/pbkdf2.nitro.d.ts +8 -0
- package/dist/typescript/specs/v1/prime.nitro.d.ts +10 -0
- package/dist/typescript/specs/v1/random.nitro.d.ts +8 -0
- package/dist/typescript/specs/v1/rsaCipher.nitro.d.ts +53 -0
- package/dist/typescript/specs/v1/rsaKeyPair.nitro.d.ts +19 -0
- package/dist/typescript/specs/v1/scrypt.nitro.d.ts +8 -0
- package/dist/typescript/specs/v1/sign.nitro.d.ts +18 -0
- package/dist/typescript/specs/v1/utils.nitro.d.ts +9 -0
- package/dist/typescript/specs/v1/x509certificate.nitro.d.ts +33 -0
- package/dist/typescript/subtle.d.ts +31 -0
- package/dist/typescript/utils/cipher.d.ts +6 -0
- package/dist/typescript/utils/conversion.d.ts +29 -0
- package/dist/typescript/utils/errors.d.ts +6 -0
- package/dist/typescript/utils/hashnames.d.ts +12 -0
- package/dist/typescript/utils/index.d.ts +7 -0
- package/dist/typescript/utils/noble.d.ts +18 -0
- package/dist/typescript/utils/timingSafeEqual.d.ts +2 -0
- package/dist/typescript/utils/types.d.ts +294 -0
- package/dist/typescript/utils/validation.d.ts +12 -0
- package/dist/typescript/x509certificate.d.ts +63 -0
- package/harmony/quick_crypto/LICENSE +21 -0
- package/harmony/quick_crypto/NOTICE +33 -0
- package/harmony/quick_crypto/OAT.xml +38 -0
- package/harmony/quick_crypto/build-profile.json5 +16 -0
- package/harmony/quick_crypto/deps/blake3/blake3.c +650 -0
- package/harmony/quick_crypto/deps/blake3/blake3.h +86 -0
- package/harmony/quick_crypto/deps/blake3/blake3_avx2.c +326 -0
- package/harmony/quick_crypto/deps/blake3/blake3_avx512.c +1388 -0
- package/harmony/quick_crypto/deps/blake3/blake3_dispatch.c +332 -0
- package/harmony/quick_crypto/deps/blake3/blake3_impl.h +333 -0
- package/harmony/quick_crypto/deps/blake3/blake3_neon.c +366 -0
- package/harmony/quick_crypto/deps/blake3/blake3_portable.c +160 -0
- package/harmony/quick_crypto/deps/blake3/blake3_sse2.c +566 -0
- package/harmony/quick_crypto/deps/blake3/blake3_sse41.c +560 -0
- package/harmony/quick_crypto/deps/blake3/example.c +36 -0
- package/harmony/quick_crypto/deps/blake3/example_tbb.c +57 -0
- package/harmony/quick_crypto/deps/blake3/main.c +166 -0
- package/harmony/quick_crypto/deps/fastpbkdf2/fastpbkdf2.c +356 -0
- package/harmony/quick_crypto/deps/fastpbkdf2/fastpbkdf2.h +68 -0
- package/harmony/quick_crypto/deps/ncrypto/include/dh-primes.h +67 -0
- package/harmony/quick_crypto/deps/ncrypto/include/ncrypto/aead.h +137 -0
- package/harmony/quick_crypto/deps/ncrypto/include/ncrypto/version.h +14 -0
- package/harmony/quick_crypto/deps/ncrypto/include/ncrypto.h +1752 -0
- package/harmony/quick_crypto/deps/ncrypto/src/aead.cpp +302 -0
- package/harmony/quick_crypto/deps/ncrypto/src/engine.cpp +93 -0
- package/harmony/quick_crypto/deps/ncrypto/src/ncrypto.cpp +5331 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/avx512.h +79 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/base64_implementation.h +158 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/base64_tables.h +887 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/common_defs.h +186 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/compiler_check.h +50 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/constexpr_ptr.h +138 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/encoding_types.h +189 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/error.h +126 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/implementation.h +7081 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/internal/isadetection.h +325 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/portability.h +285 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/ascii.h +86 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/atomic_util.h +105 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/base64.h +911 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/latin1.h +26 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/latin1_to_utf16/latin1_to_utf16.h +52 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/latin1_to_utf32/latin1_to_utf32.h +27 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/latin1_to_utf8/latin1_to_utf8.h +191 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/swap_bytes.h +35 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf16.h +226 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf16_to_latin1/utf16_to_latin1.h +108 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf16_to_latin1/valid_utf16_to_latin1.h +40 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf16_to_utf32/utf16_to_utf32.h +86 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf16_to_utf32/valid_utf16_to_utf32.h +44 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf16_to_utf8/utf16_to_utf8.h +295 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf16_to_utf8/valid_utf16_to_utf8.h +91 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf32.h +82 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf32_to_latin1/utf32_to_latin1.h +68 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf32_to_latin1/valid_utf32_to_latin1.h +67 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf32_to_utf16/utf32_to_utf16.h +84 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf32_to_utf16/valid_utf32_to_utf16.h +44 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf32_to_utf8/utf32_to_utf8.h +142 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf32_to_utf8/valid_utf32_to_utf8.h +72 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf8.h +326 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf8_to_latin1/utf8_to_latin1.h +225 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf8_to_latin1/valid_utf8_to_latin1.h +87 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf8_to_utf16/utf8_to_utf16.h +342 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf8_to_utf16/valid_utf8_to_utf16.h +106 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf8_to_utf32/utf8_to_utf32.h +299 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/scalar/utf8_to_utf32/valid_utf8_to_utf32.h +83 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf/simdutf_version.h +26 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf.h +26 -0
- package/harmony/quick_crypto/deps/simdutf/include/simdutf_c.h +342 -0
- package/harmony/quick_crypto/deps/simdutf/src/CMakeLists.txt +78 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/arm_base64.cpp +791 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/arm_convert_latin1_to_utf16.cpp +24 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/arm_convert_latin1_to_utf32.cpp +24 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/arm_convert_latin1_to_utf8.cpp +70 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/arm_convert_utf16_to_latin1.cpp +61 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/arm_convert_utf16_to_utf32.cpp +185 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/arm_convert_utf16_to_utf8.cpp +780 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/arm_convert_utf32_to_latin1.cpp +60 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/arm_convert_utf32_to_utf16.cpp +208 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/arm_convert_utf32_to_utf8.cpp +505 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/arm_convert_utf8_to_latin1.cpp +69 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/arm_convert_utf8_to_utf16.cpp +313 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/arm_convert_utf8_to_utf32.cpp +179 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/arm_find.cpp +199 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/arm_utf16fix.cpp +185 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/arm_validate_utf16.cpp +165 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/arm_validate_utf32le.cpp +65 -0
- package/harmony/quick_crypto/deps/simdutf/src/arm64/implementation.cpp +1442 -0
- package/harmony/quick_crypto/deps/simdutf/src/encoding_types.cpp +67 -0
- package/harmony/quick_crypto/deps/simdutf/src/error.cpp +3 -0
- package/harmony/quick_crypto/deps/simdutf/src/fallback/implementation.cpp +589 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/ascii_validation.h +50 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/base64.h +233 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/base64lengths.h +63 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/buf_block_reader.h +109 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/find.h +75 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf16/change_endianness.h +24 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf16/count_code_points_bytemask.h +58 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf16/to_well_formed.h +93 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf16/utf32_length_from_utf16.h +15 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf16/utf8_length_from_utf16.h +35 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf16/utf8_length_from_utf16_bytemask.h +199 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf16.h +73 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf32.h +136 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf8/utf16_length_from_utf8_bytemask.h +53 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf8.h +92 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf8_to_latin1/utf8_to_latin1.h +316 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf8_to_latin1/valid_utf8_to_latin1.h +78 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf8_to_utf16/utf8_to_utf16.h +332 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf8_to_utf16/valid_utf8_to_utf16.h +74 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf8_to_utf32/utf8_to_utf32.h +318 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf8_to_utf32/valid_utf8_to_utf32.h +42 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf8_validation/utf8_lookup4_algorithm.h +223 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/utf8_validation/utf8_validator.h +84 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/validate_utf16.h +164 -0
- package/harmony/quick_crypto/deps/simdutf/src/generic/validate_utf32.h +99 -0
- package/harmony/quick_crypto/deps/simdutf/src/haswell/avx2_base64.cpp +837 -0
- package/harmony/quick_crypto/deps/simdutf/src/haswell/avx2_convert_latin1_to_utf16.cpp +28 -0
- package/harmony/quick_crypto/deps/simdutf/src/haswell/avx2_convert_latin1_to_utf32.cpp +20 -0
- package/harmony/quick_crypto/deps/simdutf/src/haswell/avx2_convert_latin1_to_utf8.cpp +83 -0
- package/harmony/quick_crypto/deps/simdutf/src/haswell/avx2_convert_utf16_to_latin1.cpp +83 -0
- package/harmony/quick_crypto/deps/simdutf/src/haswell/avx2_convert_utf16_to_utf32.cpp +210 -0
- package/harmony/quick_crypto/deps/simdutf/src/haswell/avx2_convert_utf16_to_utf8.cpp +602 -0
- package/harmony/quick_crypto/deps/simdutf/src/haswell/avx2_convert_utf32_to_latin1.cpp +116 -0
- package/harmony/quick_crypto/deps/simdutf/src/haswell/avx2_convert_utf32_to_utf16.cpp +164 -0
- package/harmony/quick_crypto/deps/simdutf/src/haswell/avx2_convert_utf32_to_utf8.cpp +569 -0
- package/harmony/quick_crypto/deps/simdutf/src/haswell/avx2_convert_utf8_to_latin1.cpp +60 -0
- package/harmony/quick_crypto/deps/simdutf/src/haswell/avx2_convert_utf8_to_utf16.cpp +195 -0
- package/harmony/quick_crypto/deps/simdutf/src/haswell/avx2_convert_utf8_to_utf32.cpp +135 -0
- package/harmony/quick_crypto/deps/simdutf/src/haswell/avx2_utf16fix.cpp +173 -0
- package/harmony/quick_crypto/deps/simdutf/src/haswell/avx2_validate_utf16.cpp +17 -0
- package/harmony/quick_crypto/deps/simdutf/src/haswell/implementation.cpp +1447 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_ascii_validation.inl.cpp +19 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_base64.inl.cpp +630 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_common.inl.cpp +37 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_convert_latin1_to_utf16.inl.cpp +36 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_convert_latin1_to_utf32.inl.cpp +23 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_convert_latin1_to_utf8.inl.cpp +107 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_convert_utf16_to_latin1.inl.cpp +103 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_convert_utf16_to_utf32.inl.cpp +136 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_convert_utf16_to_utf8.inl.cpp +206 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_convert_utf32_to_latin1.inl.cpp +74 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_convert_utf32_to_utf16.inl.cpp +338 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_convert_utf32_to_utf8.inl.cpp +574 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_convert_utf8_to_latin1.inl.cpp +104 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_convert_utf8_to_utf16.inl.cpp +75 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_convert_valid_utf8_to_latin1.inl.cpp +69 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_find.inl.cpp +146 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_from_utf8.inl.cpp +266 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_from_valid_utf8.inl.cpp +136 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_macros.inl.cpp +143 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_utf16fix.cpp +138 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_utf32_validation.inl.cpp +63 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_utf8_common.inl.cpp +753 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_utf8_length_from_utf16.inl.cpp +269 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/icelake_utf8_validation.inl.cpp +116 -0
- package/harmony/quick_crypto/deps/simdutf/src/icelake/implementation.cpp +1903 -0
- package/harmony/quick_crypto/deps/simdutf/src/implementation.cpp +2526 -0
- package/harmony/quick_crypto/deps/simdutf/src/lasx/implementation.cpp +1531 -0
- package/harmony/quick_crypto/deps/simdutf/src/lasx/lasx_base64.cpp +695 -0
- package/harmony/quick_crypto/deps/simdutf/src/lasx/lasx_convert_latin1_to_utf16.cpp +76 -0
- package/harmony/quick_crypto/deps/simdutf/src/lasx/lasx_convert_latin1_to_utf32.cpp +55 -0
- package/harmony/quick_crypto/deps/simdutf/src/lasx/lasx_convert_latin1_to_utf8.cpp +65 -0
- package/harmony/quick_crypto/deps/simdutf/src/lasx/lasx_convert_utf16_to_latin1.cpp +64 -0
- package/harmony/quick_crypto/deps/simdutf/src/lasx/lasx_convert_utf16_to_utf32.cpp +183 -0
- package/harmony/quick_crypto/deps/simdutf/src/lasx/lasx_convert_utf16_to_utf8.cpp +550 -0
- package/harmony/quick_crypto/deps/simdutf/src/lasx/lasx_convert_utf32_to_latin1.cpp +73 -0
- package/harmony/quick_crypto/deps/simdutf/src/lasx/lasx_convert_utf32_to_utf16.cpp +218 -0
- package/harmony/quick_crypto/deps/simdutf/src/lasx/lasx_convert_utf32_to_utf8.cpp +589 -0
- package/harmony/quick_crypto/deps/simdutf/src/lasx/lasx_convert_utf8_to_latin1.cpp +72 -0
- package/harmony/quick_crypto/deps/simdutf/src/lasx/lasx_convert_utf8_to_utf16.cpp +296 -0
- package/harmony/quick_crypto/deps/simdutf/src/lasx/lasx_convert_utf8_to_utf32.cpp +190 -0
- package/harmony/quick_crypto/deps/simdutf/src/lasx/lasx_find.cpp +64 -0
- package/harmony/quick_crypto/deps/simdutf/src/lasx/lasx_validate_utf16.cpp +13 -0
- package/harmony/quick_crypto/deps/simdutf/src/lasx/lasx_validate_utf32le.cpp +84 -0
- package/harmony/quick_crypto/deps/simdutf/src/lsx/implementation.cpp +1417 -0
- package/harmony/quick_crypto/deps/simdutf/src/lsx/lsx_base64.cpp +675 -0
- package/harmony/quick_crypto/deps/simdutf/src/lsx/lsx_convert_latin1_to_utf16.cpp +39 -0
- package/harmony/quick_crypto/deps/simdutf/src/lsx/lsx_convert_latin1_to_utf32.cpp +27 -0
- package/harmony/quick_crypto/deps/simdutf/src/lsx/lsx_convert_latin1_to_utf8.cpp +56 -0
- package/harmony/quick_crypto/deps/simdutf/src/lsx/lsx_convert_utf16_to_latin1.cpp +64 -0
- package/harmony/quick_crypto/deps/simdutf/src/lsx/lsx_convert_utf16_to_utf32.cpp +133 -0
- package/harmony/quick_crypto/deps/simdutf/src/lsx/lsx_convert_utf16_to_utf8.cpp +518 -0
- package/harmony/quick_crypto/deps/simdutf/src/lsx/lsx_convert_utf32_to_latin1.cpp +66 -0
- package/harmony/quick_crypto/deps/simdutf/src/lsx/lsx_convert_utf32_to_utf16.cpp +155 -0
- package/harmony/quick_crypto/deps/simdutf/src/lsx/lsx_convert_utf32_to_utf8.cpp +459 -0
- package/harmony/quick_crypto/deps/simdutf/src/lsx/lsx_convert_utf8_to_latin1.cpp +75 -0
- package/harmony/quick_crypto/deps/simdutf/src/lsx/lsx_convert_utf8_to_utf16.cpp +291 -0
- package/harmony/quick_crypto/deps/simdutf/src/lsx/lsx_convert_utf8_to_utf32.cpp +179 -0
- package/harmony/quick_crypto/deps/simdutf/src/lsx/lsx_find.cpp +60 -0
- package/harmony/quick_crypto/deps/simdutf/src/lsx/lsx_validate_utf16.cpp +13 -0
- package/harmony/quick_crypto/deps/simdutf/src/lsx/lsx_validate_utf32le.cpp +68 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/implementation.cpp +992 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/ppc64_base64.cpp +480 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/ppc64_base64_internal_tests.cpp +401 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/ppc64_convert_latin1_to_utf16.cpp +12 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/ppc64_convert_latin1_to_utf32.cpp +12 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/ppc64_convert_latin1_to_utf8.cpp +149 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/ppc64_convert_utf16_to_latin1.cpp +67 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/ppc64_convert_utf16_to_utf32.cpp +87 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/ppc64_convert_utf16_to_utf8.cpp +296 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/ppc64_convert_utf32_to_latin1.cpp +57 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/ppc64_convert_utf32_to_utf16.cpp +117 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/ppc64_convert_utf32_to_utf8.cpp +166 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/ppc64_convert_utf8_to_latin1.cpp +69 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/ppc64_convert_utf8_to_utf16.cpp +211 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/ppc64_convert_utf8_to_utf32.cpp +153 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/ppc64_utf16_to_utf8_tables.h +1011 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/ppc64_utf8_length_from_latin1.cpp +37 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/ppc64_validate_utf16.cpp +19 -0
- package/harmony/quick_crypto/deps/simdutf/src/ppc64/templates.cpp +91 -0
- package/harmony/quick_crypto/deps/simdutf/src/rvv/implementation.cpp +138 -0
- package/harmony/quick_crypto/deps/simdutf/src/rvv/rvv_find.cpp +27 -0
- package/harmony/quick_crypto/deps/simdutf/src/rvv/rvv_helpers.inl.cpp +23 -0
- package/harmony/quick_crypto/deps/simdutf/src/rvv/rvv_latin1_to.inl.cpp +71 -0
- package/harmony/quick_crypto/deps/simdutf/src/rvv/rvv_length_from.inl.cpp +164 -0
- package/harmony/quick_crypto/deps/simdutf/src/rvv/rvv_utf16_to.inl.cpp +399 -0
- package/harmony/quick_crypto/deps/simdutf/src/rvv/rvv_utf16fix.cpp +110 -0
- package/harmony/quick_crypto/deps/simdutf/src/rvv/rvv_utf32_to.inl.cpp +307 -0
- package/harmony/quick_crypto/deps/simdutf/src/rvv/rvv_utf8_to.inl.cpp +435 -0
- package/harmony/quick_crypto/deps/simdutf/src/rvv/rvv_validate.inl.cpp +275 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/arm64/begin.h +2 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/arm64/bitmanipulation.h +34 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/arm64/end.h +2 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/arm64/implementation.h +307 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/arm64/intrinsics.h +10 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/arm64/simd.h +547 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/arm64/simd16-inl.h +403 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/arm64/simd32-inl.h +129 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/arm64/simd64-inl.h +28 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/arm64.h +43 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/fallback/begin.h +1 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/fallback/bitmanipulation.h +13 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/fallback/end.h +1 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/fallback/implementation.h +331 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/fallback.h +42 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/haswell/begin.h +15 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/haswell/bitmanipulation.h +35 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/haswell/end.h +13 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/haswell/implementation.h +338 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/haswell/intrinsics.h +67 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/haswell/simd.h +363 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/haswell/simd16-inl.h +261 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/haswell/simd32-inl.h +111 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/haswell/simd64-inl.h +34 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/haswell.h +63 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/icelake/begin.h +14 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/icelake/bitmanipulation.h +44 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/icelake/end.h +12 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/icelake/implementation.h +346 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/icelake/intrinsics.h +138 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/icelake/simd.h +17 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/icelake/simd16-inl.h +90 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/icelake/simd32-inl.h +47 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/icelake.h +81 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lasx/begin.h +8 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lasx/bitmanipulation.h +25 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lasx/end.h +8 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lasx/implementation.h +310 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lasx/intrinsics.h +319 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lasx/simd.h +551 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lasx/simd16-inl.h +234 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lasx/simd32-inl.h +74 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lasx/simd64-inl.h +52 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lasx.h +49 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lsx/begin.h +2 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lsx/bitmanipulation.h +25 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lsx/end.h +2 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lsx/implementation.h +309 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lsx/intrinsics.h +196 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lsx/simd.h +421 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lsx/simd16-inl.h +242 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lsx/simd32-inl.h +69 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lsx/simd64-inl.h +50 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/lsx.h +52 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/ppc64/begin.h +1 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/ppc64/bitmanipulation.h +29 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/ppc64/end.h +1 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/ppc64/implementation.h +348 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/ppc64/intrinsics.h +19 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/ppc64/simd.h +177 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/ppc64/simd16-inl.h +327 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/ppc64/simd32-inl.h +247 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/ppc64/simd8-inl.h +618 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/ppc64.h +40 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/rvv/begin.h +7 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/rvv/end.h +7 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/rvv/implementation.h +321 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/rvv/intrinsics.h +131 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/rvv.h +41 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/westmere/begin.h +8 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/westmere/bitmanipulation.h +37 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/westmere/end.h +8 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/westmere/implementation.h +338 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/westmere/intrinsics.h +38 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/westmere/simd.h +379 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/westmere/simd16-inl.h +242 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/westmere/simd32-inl.h +151 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/westmere/simd64-inl.h +33 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf/westmere.h +59 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf.cpp +152 -0
- package/harmony/quick_crypto/deps/simdutf/src/simdutf_c.cpp +525 -0
- package/harmony/quick_crypto/deps/simdutf/src/tables/utf16_to_utf8_tables.h +768 -0
- package/harmony/quick_crypto/deps/simdutf/src/tables/utf32_to_utf16_tables.h +53 -0
- package/harmony/quick_crypto/deps/simdutf/src/tables/utf8_to_utf16_tables.h +826 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/implementation.cpp +1479 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/internal/loader.cpp +7 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/internal/write_v_u16_11bits_to_utf8.cpp +66 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/sse_base64.cpp +672 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/sse_convert_latin1_to_utf16.cpp +21 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/sse_convert_latin1_to_utf32.cpp +31 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/sse_convert_latin1_to_utf8.cpp +71 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/sse_convert_utf16_to_latin1.cpp +70 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/sse_convert_utf16_to_utf32.cpp +206 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/sse_convert_utf16_to_utf8.cpp +504 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/sse_convert_utf32_to_latin1.cpp +82 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/sse_convert_utf32_to_utf16.cpp +209 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/sse_convert_utf32_to_utf8.cpp +589 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/sse_convert_utf8_to_latin1.cpp +58 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/sse_convert_utf8_to_utf16.cpp +197 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/sse_convert_utf8_to_utf32.cpp +141 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/sse_utf16fix.cpp +82 -0
- package/harmony/quick_crypto/deps/simdutf/src/westmere/sse_validate_utf16.cpp +17 -0
- package/harmony/quick_crypto/hvigorfile.ts +2 -0
- package/harmony/quick_crypto/index.ets +1 -0
- package/harmony/quick_crypto/oh-package.json5 +14 -0
- package/harmony/quick_crypto/src/main/cpp/CMakeLists.txt +296 -0
- package/harmony/quick_crypto/src/main/cpp/QuickCryptoOnLoad.cpp +211 -0
- package/harmony/quick_crypto/src/main/cpp/QuickCryptoOnLoad.hpp +16 -0
- package/harmony/quick_crypto/src/main/cpp/QuickCryptoPackage.h +50 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/argon2/HybridArgon2.cpp +103 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/argon2/HybridArgon2.hpp +32 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/blake3/HybridBlake3.cpp +118 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/blake3/HybridBlake3.hpp +35 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/certificate/HybridCertificate.cpp +42 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/certificate/HybridCertificate.hpp +16 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/CCMCipher.cpp +202 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/CCMCipher.hpp +26 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/ChaCha20Cipher.cpp +99 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/ChaCha20Cipher.hpp +25 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/ChaCha20Poly1305Cipher.cpp +170 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/ChaCha20Poly1305Cipher.hpp +29 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/GCMCipher.cpp +68 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/GCMCipher.hpp +14 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/HybridCipher.cpp +415 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/HybridCipher.hpp +74 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/HybridCipherFactory.hpp +119 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/HybridRsaCipher.cpp +440 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/HybridRsaCipher.hpp +33 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/OCBCipher.cpp +55 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/OCBCipher.hpp +19 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/XChaCha20Poly1305Cipher.cpp +163 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/XChaCha20Poly1305Cipher.hpp +42 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/XSalsa20Cipher.cpp +65 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/XSalsa20Cipher.hpp +33 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/XSalsa20Poly1305Cipher.cpp +147 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/cipher/XSalsa20Poly1305Cipher.hpp +41 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/dh/HybridDhKeyPair.cpp +179 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/dh/HybridDhKeyPair.hpp +37 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/dh/HybridDiffieHellman.cpp +501 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/dh/HybridDiffieHellman.hpp +42 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/dsa/HybridDsaKeyPair.cpp +128 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/dsa/HybridDsaKeyPair.hpp +32 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/ec/HybridEcKeyPair.cpp +479 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/ec/HybridEcKeyPair.hpp +49 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/ecdh/HybridECDH.cpp +228 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/ecdh/HybridECDH.hpp +43 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/ed25519/HybridEdKeyPair.cpp +404 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/ed25519/HybridEdKeyPair.hpp +71 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/hash/HybridHash.cpp +207 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/hash/HybridHash.hpp +43 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/hkdf/HybridHkdf.cpp +96 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/hkdf/HybridHkdf.hpp +28 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/hmac/HybridHmac.cpp +104 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/hmac/HybridHmac.hpp +32 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/keys/HybridKeyObjectHandle.cpp +891 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/keys/HybridKeyObjectHandle.hpp +58 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/keys/KeyObjectData.cpp +284 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/keys/KeyObjectData.hpp +73 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/keys/node.h +5 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/kmac/HybridKmac.cpp +83 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/kmac/HybridKmac.hpp +31 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/mldsa/HybridMlDsaKeyPair.cpp +255 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/mldsa/HybridMlDsaKeyPair.hpp +49 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/mlkem/HybridMlKemKeyPair.cpp +319 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/mlkem/HybridMlKemKeyPair.hpp +48 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/pbkdf2/HybridPbkdf2.cpp +51 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/pbkdf2/HybridPbkdf2.hpp +24 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/prime/HybridPrime.cpp +81 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/prime/HybridPrime.hpp +20 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/random/HybridRandom.cpp +48 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/random/HybridRandom.hpp +32 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/rsa/HybridRsaKeyPair.cpp +154 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/rsa/HybridRsaKeyPair.hpp +43 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/scrypt/HybridScrypt.cpp +62 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/scrypt/HybridScrypt.hpp +28 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/sign/HybridSignHandle.cpp +266 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/sign/HybridSignHandle.hpp +36 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/sign/HybridVerifyHandle.cpp +227 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/sign/HybridVerifyHandle.hpp +36 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/sign/SignUtils.hpp +91 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/utils/HybridUtils.cpp +197 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/utils/HybridUtils.hpp +17 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/utils/Macros.hpp +68 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/utils/QuickCryptoUtils.cpp +44 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/utils/QuickCryptoUtils.hpp +114 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/utils/base64.h +309 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/x509/HybridX509Certificate.cpp +174 -0
- package/harmony/quick_crypto/src/main/cpp/cpp/x509/HybridX509Certificate.hpp +51 -0
- package/harmony/quick_crypto/src/main/cpp/generated/RNOH/generated/BaseQuickCryptoPackage.h +72 -0
- package/harmony/quick_crypto/src/main/cpp/generated/RNOH/generated/dummy.cpp +2 -0
- package/harmony/quick_crypto/src/main/cpp/generated/RNOH/generated/turbo_modules/QuickCrypto.cpp +16 -0
- package/harmony/quick_crypto/src/main/cpp/generated/RNOH/generated/turbo_modules/QuickCrypto.h +16 -0
- package/harmony/quick_crypto/src/main/cpp/generated/react/renderer/components/quick_crypto/ComponentDescriptors.h +24 -0
- package/harmony/quick_crypto/src/main/cpp/generated/react/renderer/components/quick_crypto/EventEmitters.cpp +16 -0
- package/harmony/quick_crypto/src/main/cpp/generated/react/renderer/components/quick_crypto/EventEmitters.h +17 -0
- package/harmony/quick_crypto/src/main/cpp/generated/react/renderer/components/quick_crypto/Props.cpp +19 -0
- package/harmony/quick_crypto/src/main/cpp/generated/react/renderer/components/quick_crypto/Props.h +18 -0
- package/harmony/quick_crypto/src/main/cpp/generated/react/renderer/components/quick_crypto/ShadowNodes.cpp +17 -0
- package/harmony/quick_crypto/src/main/cpp/generated/react/renderer/components/quick_crypto/ShadowNodes.h +23 -0
- package/harmony/quick_crypto/src/main/cpp/generated/react/renderer/components/quick_crypto/States.cpp +16 -0
- package/harmony/quick_crypto/src/main/cpp/generated/react/renderer/components/quick_crypto/States.h +19 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/HarmonyDispatcher.h +84 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/AnyMap.hpp +216 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/ArrayBuffer.hpp +157 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/AssertPromiseState.hpp +34 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/BorrowingReference.hpp +223 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/BoxedHybridObject.hpp +36 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/CachedProp.hpp +44 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/CallInvokerDispatcher.hpp +38 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/CountTrailingOptionals.hpp +64 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/Dispatcher.hpp +83 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/FastVectorCopy.hpp +45 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/FutureType.hpp +28 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/HybridFunction.hpp +269 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/HybridNitroModulesProxy.hpp +52 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/HybridObject.hpp +152 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/HybridObjectPrototype.hpp +93 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/HybridObjectRegistry.hpp +53 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/InstallNitro.hpp +41 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/InstanceMethod.hpp +23 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/IsSharedPtrTo.hpp +27 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSCallback.hpp +132 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSICache.hpp +123 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSIConverter+AnyMap.hpp +86 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSIConverter+ArrayBuffer.hpp +96 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSIConverter+Date.hpp +83 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSIConverter+Exception.hpp +59 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSIConverter+Function.hpp +92 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSIConverter+HostObject.hpp +73 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSIConverter+NativeState.hpp +93 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSIConverter+Null.hpp +38 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSIConverter+Optional.hpp +50 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSIConverter+Promise.hpp +112 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSIConverter+Tuple.hpp +93 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSIConverter+UnorderedMap.hpp +70 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSIConverter+Variant.hpp +67 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSIConverter+Vector.hpp +69 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSIConverter.hpp +197 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/JSIHelpers.hpp +52 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/NitroDefines.hpp +73 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/NitroHash.hpp +61 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/NitroLogger.hpp +69 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/NitroTypeInfo.hpp +66 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/Null.hpp +42 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/ObjectUtils.hpp +94 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/Promise.hpp +324 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/PromiseType.hpp +44 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/PropNameIDCache.hpp +24 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/Prototype.hpp +182 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/PrototypeChain.hpp +78 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/ReferenceState.hpp +40 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/ThreadPool.hpp +66 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/ThreadUtils.hpp +31 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/TypeIndex.hpp +29 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/WeakReference+Owning.hpp +33 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModules/WeakReference.hpp +102 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModulesTurboModule.cpp +92 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/NitroModulesTurboModule.h +74 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/platform/ThreadUtils.cpp +60 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/AnyMap.cpp +202 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/AnyMap.hpp +216 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/ArrayBuffer.cpp +125 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/ArrayBuffer.hpp +157 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/AssertPromiseState.hpp +34 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/BorrowingReference.hpp +223 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/BoxedHybridObject.cpp +30 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/BoxedHybridObject.hpp +36 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/CachedProp.hpp +44 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/CallInvokerDispatcher.hpp +38 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/CountTrailingOptionals.hpp +64 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/Dispatcher.cpp +71 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/Dispatcher.hpp +83 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/FastVectorCopy.hpp +45 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/FutureType.hpp +28 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/HybridFunction.hpp +269 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/HybridNitroModulesProxy.cpp +92 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/HybridNitroModulesProxy.hpp +52 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/HybridObject.cpp +107 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/HybridObject.hpp +152 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/HybridObjectPrototype.cpp +113 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/HybridObjectPrototype.hpp +93 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/HybridObjectRegistry.cpp +105 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/HybridObjectRegistry.hpp +53 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/InstallNitro.cpp +29 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/InstallNitro.hpp +41 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/InstanceMethod.hpp +23 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/IsSharedPtrTo.hpp +27 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSCallback.hpp +132 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSICache.cpp +66 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSICache.hpp +123 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSIConverter+AnyMap.hpp +86 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSIConverter+ArrayBuffer.hpp +96 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSIConverter+Date.hpp +83 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSIConverter+Exception.hpp +59 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSIConverter+Function.hpp +92 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSIConverter+HostObject.hpp +73 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSIConverter+NativeState.hpp +93 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSIConverter+Null.hpp +38 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSIConverter+Optional.hpp +50 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSIConverter+Promise.hpp +112 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSIConverter+Tuple.hpp +93 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSIConverter+UnorderedMap.hpp +70 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSIConverter+Variant.hpp +67 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSIConverter+Vector.hpp +69 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSIConverter.hpp +197 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/JSIHelpers.hpp +52 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/NitroDefines.hpp +73 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/NitroHash.hpp +61 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/NitroLogger.hpp +69 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/NitroTypeInfo.cpp +80 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/NitroTypeInfo.hpp +66 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/Null.hpp +42 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/ObjectUtils.cpp +172 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/ObjectUtils.hpp +94 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/Promise.cpp +136 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/Promise.hpp +324 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/PromiseType.hpp +44 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/Prototype.hpp +182 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/PrototypeChain.hpp +78 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/ReferenceState.hpp +40 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/ThreadPool.cpp +99 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/ThreadPool.hpp +66 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/ThreadUtils.hpp +31 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/TypeIndex.hpp +29 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/WeakReference+Owning.hpp +33 -0
- package/harmony/quick_crypto/src/main/cpp/nitro/shared/WeakReference.hpp +102 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/AsymmetricKeyType.hpp +128 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/CipherArgs.hpp +101 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/CipherInfo.hpp +104 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridArgon2Spec.cpp +22 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridArgon2Spec.hpp +66 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridBlake3Spec.cpp +28 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridBlake3Spec.hpp +74 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridCertificateSpec.cpp +23 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridCertificateSpec.hpp +64 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridCipherFactorySpec.cpp +21 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridCipherFactorySpec.hpp +67 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridCipherSpec.cpp +29 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridCipherSpec.hpp +78 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridDhKeyPairSpec.cpp +27 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridDhKeyPairSpec.hpp +69 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridDiffieHellmanSpec.cpp +31 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridDiffieHellmanSpec.hpp +72 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridDsaKeyPairSpec.cpp +26 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridDsaKeyPairSpec.hpp +68 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridECDHSpec.cpp +28 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridECDHSpec.hpp +70 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridEcKeyPairSpec.cpp +30 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridEcKeyPairSpec.hpp +76 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridEdKeyPairSpec.cpp +30 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridEdKeyPairSpec.hpp +74 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridHashSpec.cpp +26 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridHashSpec.hpp +74 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridHkdfSpec.cpp +22 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridHkdfSpec.hpp +65 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridHmacSpec.cpp +23 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridHmacSpec.hpp +66 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridKeyObjectHandleSpec.cpp +30 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridKeyObjectHandleSpec.hpp +98 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridKmacSpec.cpp +23 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridKmacSpec.hpp +66 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridMlDsaKeyPairSpec.cpp +29 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridMlDsaKeyPairSpec.hpp +72 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridMlKemKeyPairSpec.cpp +31 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridMlKemKeyPairSpec.hpp +74 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridPbkdf2Spec.cpp +22 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridPbkdf2Spec.hpp +65 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridPrimeSpec.cpp +24 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridPrimeSpec.hpp +67 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridRandomSpec.cpp +22 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridRandomSpec.hpp +64 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridRsaCipherSpec.cpp +25 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridRsaCipherSpec.hpp +71 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridRsaKeyPairSpec.cpp +29 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridRsaKeyPairSpec.hpp +75 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridScryptSpec.cpp +22 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridScryptSpec.hpp +64 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridSignHandleSpec.cpp +23 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridSignHandleSpec.hpp +69 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridUtilsSpec.cpp +23 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridUtilsSpec.hpp +65 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridVerifyHandleSpec.cpp +23 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridVerifyHandleSpec.hpp +69 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridX509CertificateHandleSpec.cpp +46 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/HybridX509CertificateHandleSpec.hpp +96 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/JWK.hpp +177 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/JWKkty.hpp +88 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/JWKuse.hpp +76 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/KFormatType.hpp +63 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/KeyDetail.hpp +108 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/KeyEncoding.hpp +64 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/KeyObject.hpp +83 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/KeyType.hpp +63 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/KeyUsage.hpp +116 -0
- package/harmony/quick_crypto/src/main/cpp/nitrogen/shared/NamedCurve.hpp +80 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/README.md +11 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/__DECC_INCLUDE_EPILOGUE.H +22 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/__DECC_INCLUDE_PROLOGUE.H +26 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/aes.h +111 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/asn1.h +1134 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/asn1.h.in +967 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/asn1err.h +142 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/asn1t.h +946 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/asn1t.h.in +923 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/async.h +104 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/asyncerr.h +29 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/bio.h +1022 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/bio.h.in +999 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/bioerr.h +72 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/blowfish.h +78 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/bn.h +590 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/bnerr.h +47 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/buffer.h +62 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/buffererr.h +25 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/byteorder.h +339 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/camellia.h +117 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/cast.h +71 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/cmac.h +52 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/cmp.h +727 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/cmp.h.in +584 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/cmp_util.h +56 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/cmperr.h +134 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/cms.h +520 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/cms.h.in +422 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/cmserr.h +129 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/comp.h +98 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/comp.h.in +76 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/comperr.h +38 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/conf.h +214 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/conf.h.in +177 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/conf_api.h +46 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/conferr.h +52 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/configuration.h +224 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/configuration.h.in +75 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/conftypes.h +44 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/core.h +236 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/core_dispatch.h +1156 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/core_names.h +584 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/core_names.h.in +129 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/core_object.h +41 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/crmf.h +278 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/crmf.h.in +207 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/crmferr.h +57 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/crypto.h +614 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/crypto.h.in +591 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/cryptoerr.h +56 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/cryptoerr_legacy.h +1466 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ct.h +573 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ct.h.in +525 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/cterr.h +45 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/decoder.h +133 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/decodererr.h +28 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/des.h +211 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/dh.h +339 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/dherr.h +59 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/dsa.h +280 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/dsaerr.h +44 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/dtls1.h +57 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/e_os2.h +310 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/e_ostime.h +38 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ebcdic.h +39 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ec.h +1588 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ecdh.h +10 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ecdsa.h +10 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ecerr.h +104 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/encoder.h +124 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/encodererr.h +28 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/engine.h +833 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/engineerr.h +63 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/err.h +512 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/err.h.in +501 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ess.h +128 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ess.h.in +81 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/esserr.h +32 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/evp.h +2345 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/evperr.h +148 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/fips_names.h +50 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/fipskey.h +41 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/fipskey.h.in +40 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/hmac.h +62 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/hpke.h +169 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/http.h +119 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/httperr.h +56 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/idea.h +82 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/indicator.h +31 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/kdf.h +142 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/kdferr.h +16 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/lhash.h +398 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/lhash.h.in +373 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/macros.h +361 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/md2.h +56 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/md4.h +63 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/md5.h +62 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/mdc2.h +55 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ml_kem.h +31 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/modes.h +219 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/obj_mac.h +6695 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/objects.h +184 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/objectserr.h +28 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ocsp.h +483 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ocsp.h.in +387 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ocsperr.h +53 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/opensslconf.h +17 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/opensslv.h +109 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/opensslv.h.in +108 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ossl_typ.h +16 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/param_build.h +63 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/params.h +166 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/pem.h +548 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/pem2.h +19 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/pemerr.h +59 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/pkcs12.h +372 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/pkcs12.h.in +349 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/pkcs12err.h +46 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/pkcs7.h +430 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/pkcs7.h.in +359 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/pkcs7err.h +63 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/prov_ssl.h +38 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/proverr.h +171 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/provider.h +94 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/quic.h +75 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/rand.h +131 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/randerr.h +70 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/rc2.h +68 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/rc4.h +47 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/rc5.h +79 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ripemd.h +59 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/rsa.h +615 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/rsaerr.h +107 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/safestack.h +320 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/safestack.h.in +250 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/seed.h +113 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/self_test.h +116 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/sha.h +139 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/srp.h +285 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/srp.h.in +214 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/srtp.h +68 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ssl.h +2940 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ssl.h.in +2893 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ssl2.h +30 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ssl3.h +358 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/sslerr.h +382 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/sslerr_legacy.h +467 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/stack.h +92 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/store.h +379 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/storeerr.h +49 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/symhacks.h +39 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/thread.h +31 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/tls1.h +1226 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/trace.h +321 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ts.h +522 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/tserr.h +67 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/txt_db.h +63 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/types.h +248 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ui.h +407 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/ui.h.in +384 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/uierr.h +38 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/whrlpool.h +62 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/x509.h +1304 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/x509.h.in +1110 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/x509_acert.h +294 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/x509_acert.h.in +199 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/x509_vfy.h +921 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/x509_vfy.h.in +824 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/x509err.h +70 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/x509v3.h +1968 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/x509v3.h.in +1367 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/include/openssl/x509v3err.h +97 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/lib/libcrypto.a +0 -0
- package/harmony/quick_crypto/src/main/cpp/third_party/openssl/lib/libssl.a +0 -0
- package/harmony/quick_crypto/src/main/ets/QuickCryptoTurboModule.ts +14 -0
- package/harmony/quick_crypto/src/main/ets/QuickCryptoTurboModulesFactory.ets +26 -0
- package/harmony/quick_crypto/src/main/ets/generated/index.ets +5 -0
- package/harmony/quick_crypto/src/main/ets/generated/ts.ts +5 -0
- package/harmony/quick_crypto/src/main/ets/generated/turboModules/QuickCrypto.ts +14 -0
- package/harmony/quick_crypto/src/main/ets/generated/turboModules/ts.ts +5 -0
- package/harmony/quick_crypto/src/main/ets/nitro/Logger.ts +58 -0
- package/harmony/quick_crypto/src/main/ets/nitro/NitroModulesModule.ts +134 -0
- package/harmony/quick_crypto/src/main/module.json5 +13 -0
- package/harmony/quick_crypto/src/main/resources/base/element/string.json +8 -0
- package/harmony/quick_crypto/src/main/resources/en_US/element/string.json +8 -0
- package/harmony/quick_crypto/src/main/resources/zh_CN/element/string.json +8 -0
- package/harmony/quick_crypto.har +0 -0
- package/package.json +87 -0
- package/src/argon2.ts +83 -0
- package/src/blake3.ts +124 -0
- package/src/certificate.ts +41 -0
- package/src/cipher.ts +373 -0
- package/src/constants.ts +32 -0
- package/src/dh-groups.ts +27 -0
- package/src/dhKeyPair.ts +156 -0
- package/src/diffie-hellman.ts +195 -0
- package/src/dsa.ts +129 -0
- package/src/ec.ts +557 -0
- package/src/ecdh.ts +132 -0
- package/src/ed.ts +526 -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 +55 -0
- package/src/hash.ts +320 -0
- package/src/hkdf.ts +147 -0
- package/src/hmac.ts +140 -0
- package/src/index.ts +144 -0
- package/src/keys/classes.ts +332 -0
- package/src/keys/generateKeyPair.ts +212 -0
- package/src/keys/index.ts +298 -0
- package/src/keys/publicCipher.ts +250 -0
- package/src/keys/signVerify.ts +318 -0
- package/src/keys/utils.ts +190 -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 +334 -0
- package/src/rsa.ts +311 -0
- package/src/scrypt.ts +134 -0
- package/src/specs/v1/.gitkeep +1 -0
- package/src/specs/v1/NativeQuickCrypto.ts +19 -0
- package/src/specs/v1/argon2.nitro.ts +29 -0
- package/src/specs/v1/blake3.nitro.ts +12 -0
- package/src/specs/v1/certificate.nitro.ts +8 -0
- package/src/specs/v1/cipher.nitro.ts +39 -0
- package/src/specs/v1/dhKeyPair.nitro.ts +14 -0
- package/src/specs/v1/diffie-hellman.nitro.ts +16 -0
- package/src/specs/v1/dsaKeyPair.nitro.ts +13 -0
- package/src/specs/v1/ecKeyPair.nitro.ts +40 -0
- package/src/specs/v1/ecdh.nitro.ts +12 -0
- package/src/specs/v1/edKeyPair.nitro.ts +43 -0
- package/src/specs/v1/hash.nitro.ts +10 -0
- package/src/specs/v1/hkdf.nitro.ts +19 -0
- package/src/specs/v1/hmac.nitro.ts +7 -0
- package/src/specs/v1/keyObjectHandle.nitro.ts +39 -0
- package/src/specs/v1/kmac.nitro.ts +12 -0
- package/src/specs/v1/mlDsaKeyPair.nitro.ts +29 -0
- package/src/specs/v1/mlKemKeyPair.nitro.ts +32 -0
- package/src/specs/v1/pbkdf2.nitro.ts +18 -0
- package/src/specs/v1/prime.nitro.ts +18 -0
- package/src/specs/v1/random.nitro.ts +14 -0
- package/src/specs/v1/rsaCipher.nitro.ts +82 -0
- package/src/specs/v1/rsaKeyPair.nitro.ts +33 -0
- package/src/specs/v1/scrypt.nitro.ts +23 -0
- package/src/specs/v1/sign.nitro.ts +31 -0
- package/src/specs/v1/utils.nitro.ts +7 -0
- package/src/specs/v1/x509certificate.nitro.ts +38 -0
- package/src/specs/v2/.gitkeep +1 -0
- package/src/subtle.ts +2922 -0
- package/src/utils/cipher.ts +60 -0
- package/src/utils/conversion.ts +194 -0
- package/src/utils/errors.ts +15 -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 +23 -0
- package/src/utils/types.ts +547 -0
- package/src/utils/validation.ts +130 -0
- package/src/x509certificate.ts +277 -0
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Ed = void 0;
|
|
7
|
+
exports.diffieHellman = diffieHellman;
|
|
8
|
+
exports.ed_generateKeyPair = ed_generateKeyPair;
|
|
9
|
+
exports.ed_generateKeyPairWebCrypto = ed_generateKeyPairWebCrypto;
|
|
10
|
+
exports.xDeriveBits = xDeriveBits;
|
|
11
|
+
exports.x_generateKeyPairWebCrypto = x_generateKeyPairWebCrypto;
|
|
12
|
+
var _reactNativeNitroModules = require("react-native-nitro-modules");
|
|
13
|
+
var _reactNativeBuffer = require("@craftzdog/react-native-buffer");
|
|
14
|
+
var _classes = require("./keys/classes");
|
|
15
|
+
var _utils = require("./utils");
|
|
16
|
+
var _ecdh = require("./ecdh");
|
|
17
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
|
+
class Ed {
|
|
21
|
+
constructor(type, config) {
|
|
22
|
+
_defineProperty(this, "type", void 0);
|
|
23
|
+
_defineProperty(this, "config", void 0);
|
|
24
|
+
_defineProperty(this, "native", void 0);
|
|
25
|
+
this.type = type;
|
|
26
|
+
this.config = config;
|
|
27
|
+
this.native = _reactNativeNitroModules.NitroModules.createHybridObject('EdKeyPair');
|
|
28
|
+
this.native.setCurve(type);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Computes the Diffie-Hellman secret based on a privateKey and a publicKey.
|
|
33
|
+
* Both keys must have the same asymmetricKeyType, which must be one of 'dh'
|
|
34
|
+
* (for Diffie-Hellman), 'ec', 'x448', or 'x25519' (for ECDH).
|
|
35
|
+
*
|
|
36
|
+
* @api nodejs/node
|
|
37
|
+
*
|
|
38
|
+
* @param options `{ privateKey, publicKey }`, both of which are `KeyObject`s
|
|
39
|
+
* @param callback optional `(err, secret) => void`
|
|
40
|
+
* @returns `Buffer` if no callback, or `void` if callback is provided
|
|
41
|
+
*/
|
|
42
|
+
diffieHellman(options, callback) {
|
|
43
|
+
// extract raw key bytes from KeyObject instances
|
|
44
|
+
const privKeyObj = options.privateKey;
|
|
45
|
+
const pubKeyObj = options.publicKey;
|
|
46
|
+
const privateKey = privKeyObj.handle.exportKey();
|
|
47
|
+
const publicKey = pubKeyObj.handle.exportKey();
|
|
48
|
+
try {
|
|
49
|
+
const ret = this.native.diffieHellman(privateKey, publicKey);
|
|
50
|
+
if (!ret) {
|
|
51
|
+
throw new Error('No secret');
|
|
52
|
+
}
|
|
53
|
+
if (callback) {
|
|
54
|
+
callback(null, _reactNativeBuffer.Buffer.from(ret));
|
|
55
|
+
} else {
|
|
56
|
+
return _reactNativeBuffer.Buffer.from(ret);
|
|
57
|
+
}
|
|
58
|
+
} catch (e) {
|
|
59
|
+
const err = e;
|
|
60
|
+
if (callback) {
|
|
61
|
+
callback(err, undefined);
|
|
62
|
+
} else {
|
|
63
|
+
throw err;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
async generateKeyPair() {
|
|
68
|
+
await this.native.generateKeyPair(this.config.publicFormat ?? -1, this.config.publicType ?? -1, this.config.privateFormat ?? -1, this.config.privateType ?? -1, this.config.cipher, this.config.passphrase);
|
|
69
|
+
}
|
|
70
|
+
generateKeyPairSync() {
|
|
71
|
+
this.native.generateKeyPairSync(this.config.publicFormat ?? -1, this.config.publicType ?? -1, this.config.privateFormat ?? -1, this.config.privateType ?? -1, this.config.cipher, this.config.passphrase);
|
|
72
|
+
}
|
|
73
|
+
getPublicKey() {
|
|
74
|
+
return this.native.getPublicKey();
|
|
75
|
+
}
|
|
76
|
+
getPrivateKey() {
|
|
77
|
+
return this.native.getPrivateKey();
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Computes the Diffie-Hellman shared secret based on a privateKey and a
|
|
82
|
+
* publicKey for key exchange
|
|
83
|
+
*
|
|
84
|
+
* @api \@paulmillr/noble-curves/ed25519
|
|
85
|
+
*
|
|
86
|
+
* @param privateKey
|
|
87
|
+
* @param publicKey
|
|
88
|
+
* @returns shared secret key
|
|
89
|
+
*/
|
|
90
|
+
getSharedSecret(privateKey, publicKey) {
|
|
91
|
+
return this.native.diffieHellman((0, _utils.binaryLikeToArrayBuffer)(privateKey), (0, _utils.binaryLikeToArrayBuffer)(publicKey));
|
|
92
|
+
}
|
|
93
|
+
async sign(message, key) {
|
|
94
|
+
return key ? this.native.sign((0, _utils.binaryLikeToArrayBuffer)(message), (0, _utils.binaryLikeToArrayBuffer)(key)) : this.native.sign((0, _utils.binaryLikeToArrayBuffer)(message));
|
|
95
|
+
}
|
|
96
|
+
signSync(message, key) {
|
|
97
|
+
return key ? this.native.signSync((0, _utils.binaryLikeToArrayBuffer)(message), (0, _utils.binaryLikeToArrayBuffer)(key)) : this.native.signSync((0, _utils.binaryLikeToArrayBuffer)(message));
|
|
98
|
+
}
|
|
99
|
+
async verify(signature, message, key) {
|
|
100
|
+
return key ? this.native.verify((0, _utils.binaryLikeToArrayBuffer)(signature), (0, _utils.binaryLikeToArrayBuffer)(message), (0, _utils.binaryLikeToArrayBuffer)(key)) : this.native.verify((0, _utils.binaryLikeToArrayBuffer)(signature), (0, _utils.binaryLikeToArrayBuffer)(message));
|
|
101
|
+
}
|
|
102
|
+
verifySync(signature, message, key) {
|
|
103
|
+
return key ? this.native.verifySync((0, _utils.binaryLikeToArrayBuffer)(signature), (0, _utils.binaryLikeToArrayBuffer)(message), (0, _utils.binaryLikeToArrayBuffer)(key)) : this.native.verifySync((0, _utils.binaryLikeToArrayBuffer)(signature), (0, _utils.binaryLikeToArrayBuffer)(message));
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Node API
|
|
108
|
+
exports.Ed = Ed;
|
|
109
|
+
function diffieHellman(options, callback) {
|
|
110
|
+
checkDiffieHellmanOptions(options);
|
|
111
|
+
const privateKey = options.privateKey;
|
|
112
|
+
const keyType = privateKey.asymmetricKeyType;
|
|
113
|
+
if (keyType === 'ec') {
|
|
114
|
+
return ecDiffieHellman(options, callback);
|
|
115
|
+
}
|
|
116
|
+
const type = keyType;
|
|
117
|
+
const ed = new Ed(type, {});
|
|
118
|
+
return ed.diffieHellman(options, callback);
|
|
119
|
+
}
|
|
120
|
+
function ed_createKeyObjects(ed) {
|
|
121
|
+
const publicKeyData = ed.getPublicKey();
|
|
122
|
+
const privateKeyData = ed.getPrivateKey();
|
|
123
|
+
const pub = _classes.KeyObject.createKeyObject('public', publicKeyData, _utils.KFormatType.DER, _utils.KeyEncoding.SPKI);
|
|
124
|
+
const priv = _classes.KeyObject.createKeyObject('private', privateKeyData, _utils.KFormatType.DER, _utils.KeyEncoding.PKCS8);
|
|
125
|
+
return {
|
|
126
|
+
pub,
|
|
127
|
+
priv
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
// Node API
|
|
132
|
+
function ed_formatKeyPairOutput(ed, encoding) {
|
|
133
|
+
const {
|
|
134
|
+
publicFormat,
|
|
135
|
+
privateFormat,
|
|
136
|
+
cipher,
|
|
137
|
+
passphrase
|
|
138
|
+
} = encoding;
|
|
139
|
+
const {
|
|
140
|
+
pub,
|
|
141
|
+
priv
|
|
142
|
+
} = ed_createKeyObjects(ed);
|
|
143
|
+
let publicKey;
|
|
144
|
+
let privateKey;
|
|
145
|
+
if (publicFormat == null || publicFormat === -1) {
|
|
146
|
+
publicKey = pub;
|
|
147
|
+
} else {
|
|
148
|
+
const format = publicFormat === _utils.KFormatType.PEM ? _utils.KFormatType.PEM : _utils.KFormatType.DER;
|
|
149
|
+
const exported = pub.handle.exportKey(format, _utils.KeyEncoding.SPKI);
|
|
150
|
+
if (format === _utils.KFormatType.PEM) {
|
|
151
|
+
publicKey = _reactNativeBuffer.Buffer.from(new Uint8Array(exported)).toString('utf-8');
|
|
152
|
+
} else {
|
|
153
|
+
publicKey = exported;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (privateFormat == null || privateFormat === -1) {
|
|
157
|
+
privateKey = priv;
|
|
158
|
+
} else {
|
|
159
|
+
const format = privateFormat === _utils.KFormatType.PEM ? _utils.KFormatType.PEM : _utils.KFormatType.DER;
|
|
160
|
+
const exported = priv.handle.exportKey(format, _utils.KeyEncoding.PKCS8, cipher, passphrase);
|
|
161
|
+
if (format === _utils.KFormatType.PEM) {
|
|
162
|
+
privateKey = _reactNativeBuffer.Buffer.from(new Uint8Array(exported)).toString('utf-8');
|
|
163
|
+
} else {
|
|
164
|
+
privateKey = exported;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
return {
|
|
168
|
+
publicKey,
|
|
169
|
+
privateKey
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
function ed_generateKeyPair(isAsync, type, encoding, callback) {
|
|
173
|
+
const derConfig = {
|
|
174
|
+
...encoding,
|
|
175
|
+
publicFormat: _utils.KFormatType.DER,
|
|
176
|
+
publicType: _utils.KeyEncoding.SPKI,
|
|
177
|
+
privateFormat: _utils.KFormatType.DER,
|
|
178
|
+
privateType: _utils.KeyEncoding.PKCS8
|
|
179
|
+
};
|
|
180
|
+
const ed = new Ed(type, derConfig);
|
|
181
|
+
if (isAsync) {
|
|
182
|
+
if (!callback) {
|
|
183
|
+
throw new Error('A callback is required for async key generation.');
|
|
184
|
+
}
|
|
185
|
+
ed.generateKeyPair().then(() => {
|
|
186
|
+
const {
|
|
187
|
+
publicKey,
|
|
188
|
+
privateKey
|
|
189
|
+
} = ed_formatKeyPairOutput(ed, encoding);
|
|
190
|
+
callback(undefined, publicKey, privateKey);
|
|
191
|
+
}).catch(err => {
|
|
192
|
+
callback(err, undefined, undefined);
|
|
193
|
+
});
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
let err;
|
|
197
|
+
try {
|
|
198
|
+
ed.generateKeyPairSync();
|
|
199
|
+
} catch (e) {
|
|
200
|
+
err = e instanceof Error ? e : new Error(String(e));
|
|
201
|
+
}
|
|
202
|
+
const {
|
|
203
|
+
publicKey,
|
|
204
|
+
privateKey
|
|
205
|
+
} = err ? {
|
|
206
|
+
publicKey: undefined,
|
|
207
|
+
privateKey: undefined
|
|
208
|
+
} : ed_formatKeyPairOutput(ed, encoding);
|
|
209
|
+
if (callback) {
|
|
210
|
+
callback(err, publicKey, privateKey);
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
return [err, publicKey, privateKey];
|
|
214
|
+
}
|
|
215
|
+
function ecDiffieHellman(options, callback) {
|
|
216
|
+
const privateKey = options.privateKey;
|
|
217
|
+
const publicKey = options.publicKey;
|
|
218
|
+
const curveName = privateKey.namedCurve;
|
|
219
|
+
if (!curveName) {
|
|
220
|
+
throw new Error('Unable to determine EC curve name from private key');
|
|
221
|
+
}
|
|
222
|
+
const ecdh = new _ecdh.ECDH(curveName);
|
|
223
|
+
const jwkPrivate = privateKey.handle.exportJwk({}, false);
|
|
224
|
+
if (!jwkPrivate.d) throw new Error('Invalid private key');
|
|
225
|
+
ecdh.setPrivateKey(_reactNativeBuffer.Buffer.from(jwkPrivate.d, 'base64url'));
|
|
226
|
+
const jwkPublic = publicKey.handle.exportJwk({}, false);
|
|
227
|
+
if (!jwkPublic.x || !jwkPublic.y) throw new Error('Invalid public key');
|
|
228
|
+
const x = _reactNativeBuffer.Buffer.from(jwkPublic.x, 'base64url');
|
|
229
|
+
const y = _reactNativeBuffer.Buffer.from(jwkPublic.y, 'base64url');
|
|
230
|
+
const publicBytes = _reactNativeBuffer.Buffer.concat([_reactNativeBuffer.Buffer.from([0x04]), x, y]);
|
|
231
|
+
try {
|
|
232
|
+
const secret = ecdh.computeSecret(publicBytes);
|
|
233
|
+
if (callback) {
|
|
234
|
+
callback(null, secret);
|
|
235
|
+
} else {
|
|
236
|
+
return secret;
|
|
237
|
+
}
|
|
238
|
+
} catch (e) {
|
|
239
|
+
const err = e;
|
|
240
|
+
if (callback) {
|
|
241
|
+
callback(err, undefined);
|
|
242
|
+
} else {
|
|
243
|
+
throw err;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
function checkDiffieHellmanOptions(options) {
|
|
248
|
+
const {
|
|
249
|
+
privateKey,
|
|
250
|
+
publicKey
|
|
251
|
+
} = options;
|
|
252
|
+
|
|
253
|
+
// Check if keys are KeyObject instances
|
|
254
|
+
if (!privateKey || typeof privateKey !== 'object' || !('type' in privateKey)) {
|
|
255
|
+
throw new Error('privateKey must be a KeyObject');
|
|
256
|
+
}
|
|
257
|
+
if (!publicKey || typeof publicKey !== 'object' || !('type' in publicKey)) {
|
|
258
|
+
throw new Error('publicKey must be a KeyObject');
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// type checks
|
|
262
|
+
if (privateKey.type !== 'private') {
|
|
263
|
+
throw new Error('privateKey must be a private KeyObject');
|
|
264
|
+
}
|
|
265
|
+
if (publicKey.type !== 'public') {
|
|
266
|
+
throw new Error('publicKey must be a public KeyObject');
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
// For asymmetric keys, check if they have the asymmetricKeyType property
|
|
270
|
+
const privateKeyAsym = privateKey;
|
|
271
|
+
const publicKeyAsym = publicKey;
|
|
272
|
+
|
|
273
|
+
// key types must match
|
|
274
|
+
if (privateKeyAsym.asymmetricKeyType && publicKeyAsym.asymmetricKeyType && privateKeyAsym.asymmetricKeyType !== publicKeyAsym.asymmetricKeyType) {
|
|
275
|
+
throw new Error('Keys must be asymmetric and their types must match');
|
|
276
|
+
}
|
|
277
|
+
switch (privateKeyAsym.asymmetricKeyType) {
|
|
278
|
+
// case 'dh': // TODO: uncomment when implemented
|
|
279
|
+
case 'ec':
|
|
280
|
+
{
|
|
281
|
+
const privateCurve = privateKeyAsym.namedCurve;
|
|
282
|
+
const publicCurve = publicKeyAsym.namedCurve;
|
|
283
|
+
if (privateCurve && publicCurve && privateCurve !== publicCurve) {
|
|
284
|
+
throw new Error('Private and public key curves do not match');
|
|
285
|
+
}
|
|
286
|
+
break;
|
|
287
|
+
}
|
|
288
|
+
case 'x25519':
|
|
289
|
+
case 'x448':
|
|
290
|
+
break;
|
|
291
|
+
default:
|
|
292
|
+
throw new Error(`Unknown curve type: ${privateKeyAsym.asymmetricKeyType}`);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
async function ed_generateKeyPairWebCrypto(type, extractable, keyUsages) {
|
|
296
|
+
if ((0, _utils.hasAnyNotIn)(keyUsages, ['sign', 'verify'])) {
|
|
297
|
+
throw (0, _utils.lazyDOMException)(`Unsupported key usage for ${type}`, 'SyntaxError');
|
|
298
|
+
}
|
|
299
|
+
const publicUsages = (0, _utils.getUsagesUnion)(keyUsages, 'verify');
|
|
300
|
+
const privateUsages = (0, _utils.getUsagesUnion)(keyUsages, 'sign');
|
|
301
|
+
if (privateUsages.length === 0) {
|
|
302
|
+
throw (0, _utils.lazyDOMException)('Usages cannot be empty', 'SyntaxError');
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
// Request DER-encoded SPKI for public key, PKCS8 for private key
|
|
306
|
+
const config = {
|
|
307
|
+
publicFormat: _utils.KFormatType.DER,
|
|
308
|
+
publicType: _utils.KeyEncoding.SPKI,
|
|
309
|
+
privateFormat: _utils.KFormatType.DER,
|
|
310
|
+
privateType: _utils.KeyEncoding.PKCS8
|
|
311
|
+
};
|
|
312
|
+
const ed = new Ed(type, config);
|
|
313
|
+
await ed.generateKeyPair();
|
|
314
|
+
const algorithmName = type === 'ed25519' ? 'Ed25519' : 'Ed448';
|
|
315
|
+
const {
|
|
316
|
+
pub,
|
|
317
|
+
priv
|
|
318
|
+
} = ed_createKeyObjects(ed);
|
|
319
|
+
const publicKey = new _classes.CryptoKey(pub, {
|
|
320
|
+
name: algorithmName
|
|
321
|
+
}, publicUsages, true);
|
|
322
|
+
const privateKey = new _classes.CryptoKey(priv, {
|
|
323
|
+
name: algorithmName
|
|
324
|
+
}, privateUsages, extractable);
|
|
325
|
+
return {
|
|
326
|
+
publicKey,
|
|
327
|
+
privateKey
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
async function x_generateKeyPairWebCrypto(type, extractable, keyUsages) {
|
|
331
|
+
if ((0, _utils.hasAnyNotIn)(keyUsages, ['deriveKey', 'deriveBits'])) {
|
|
332
|
+
throw (0, _utils.lazyDOMException)(`Unsupported key usage for ${type}`, 'SyntaxError');
|
|
333
|
+
}
|
|
334
|
+
const publicUsages = (0, _utils.getUsagesUnion)(keyUsages);
|
|
335
|
+
const privateUsages = (0, _utils.getUsagesUnion)(keyUsages, 'deriveKey', 'deriveBits');
|
|
336
|
+
if (privateUsages.length === 0) {
|
|
337
|
+
throw (0, _utils.lazyDOMException)('Usages cannot be empty', 'SyntaxError');
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// Request DER-encoded SPKI for public key, PKCS8 for private key
|
|
341
|
+
const config = {
|
|
342
|
+
publicFormat: _utils.KFormatType.DER,
|
|
343
|
+
publicType: _utils.KeyEncoding.SPKI,
|
|
344
|
+
privateFormat: _utils.KFormatType.DER,
|
|
345
|
+
privateType: _utils.KeyEncoding.PKCS8
|
|
346
|
+
};
|
|
347
|
+
const ed = new Ed(type, config);
|
|
348
|
+
await ed.generateKeyPair();
|
|
349
|
+
const algorithmName = type === 'x25519' ? 'X25519' : 'X448';
|
|
350
|
+
const {
|
|
351
|
+
pub,
|
|
352
|
+
priv
|
|
353
|
+
} = ed_createKeyObjects(ed);
|
|
354
|
+
const publicKey = new _classes.CryptoKey(pub, {
|
|
355
|
+
name: algorithmName
|
|
356
|
+
}, publicUsages, true);
|
|
357
|
+
const privateKey = new _classes.CryptoKey(priv, {
|
|
358
|
+
name: algorithmName
|
|
359
|
+
}, privateUsages, extractable);
|
|
360
|
+
return {
|
|
361
|
+
publicKey,
|
|
362
|
+
privateKey
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
function xDeriveBits(algorithm, baseKey, length) {
|
|
366
|
+
const publicKey = algorithm.public;
|
|
367
|
+
if (!publicKey) {
|
|
368
|
+
throw new Error('Public key is required for X25519/X448 derivation');
|
|
369
|
+
}
|
|
370
|
+
if (baseKey.algorithm.name !== publicKey.algorithm.name) {
|
|
371
|
+
throw new Error('Keys must be of the same algorithm');
|
|
372
|
+
}
|
|
373
|
+
const type = baseKey.algorithm.name.toLowerCase();
|
|
374
|
+
const ed = new Ed(type, {});
|
|
375
|
+
|
|
376
|
+
// Export raw keys
|
|
377
|
+
const privateKeyBytes = baseKey.keyObject.handle.exportKey();
|
|
378
|
+
const publicKeyBytes = publicKey.keyObject.handle.exportKey();
|
|
379
|
+
const privateKeyTyped = new Uint8Array(privateKeyBytes);
|
|
380
|
+
const publicKeyTyped = new Uint8Array(publicKeyBytes);
|
|
381
|
+
const secret = ed.getSharedSecret(privateKeyTyped, publicKeyTyped);
|
|
382
|
+
|
|
383
|
+
// If length is null, return the full secret
|
|
384
|
+
if (length === null) {
|
|
385
|
+
return secret;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// If length is specified, truncate
|
|
389
|
+
const byteLength = Math.ceil(length / 8);
|
|
390
|
+
if (secret.byteLength >= byteLength) {
|
|
391
|
+
return secret.slice(0, byteLength);
|
|
392
|
+
}
|
|
393
|
+
throw new Error('Derived key is shorter than requested length');
|
|
394
|
+
}
|
|
395
|
+
//# sourceMappingURL=ed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNativeNitroModules","require","_reactNativeBuffer","_classes","_utils","_ecdh","_defineProperty","e","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","Ed","constructor","type","config","native","NitroModules","createHybridObject","setCurve","diffieHellman","options","callback","privKeyObj","privateKey","pubKeyObj","publicKey","handle","exportKey","ret","Error","Buffer","from","err","undefined","generateKeyPair","publicFormat","publicType","privateFormat","privateType","cipher","passphrase","generateKeyPairSync","getPublicKey","getPrivateKey","getSharedSecret","toAB","sign","message","key","signSync","verify","signature","verifySync","exports","checkDiffieHellmanOptions","keyType","asymmetricKeyType","ecDiffieHellman","ed","ed_createKeyObjects","publicKeyData","privateKeyData","pub","KeyObject","createKeyObject","KFormatType","DER","KeyEncoding","SPKI","priv","PKCS8","ed_formatKeyPairOutput","encoding","format","PEM","exported","Uint8Array","toString","ed_generateKeyPair","isAsync","derConfig","then","catch","curveName","namedCurve","ecdh","ECDH","jwkPrivate","exportJwk","d","setPrivateKey","jwkPublic","x","y","publicBytes","concat","secret","computeSecret","privateKeyAsym","publicKeyAsym","privateCurve","publicCurve","ed_generateKeyPairWebCrypto","extractable","keyUsages","hasAnyNotIn","lazyDOMException","publicUsages","getUsagesUnion","privateUsages","length","algorithmName","CryptoKey","name","x_generateKeyPairWebCrypto","xDeriveBits","algorithm","baseKey","public","toLowerCase","privateKeyBytes","keyObject","publicKeyBytes","privateKeyTyped","publicKeyTyped","byteLength","Math","ceil","slice"],"sources":["ed.ts"],"sourcesContent":["import { NitroModules } from 'react-native-nitro-modules';\r\nimport { Buffer } from '@craftzdog/react-native-buffer';\r\nimport type { AsymmetricKeyObject, PrivateKeyObject } from './keys/classes';\r\nimport {\r\n CryptoKey,\r\n KeyObject,\r\n PublicKeyObject,\r\n PrivateKeyObject as PrivateKeyObjectClass,\r\n} from './keys/classes';\r\nimport type { EdKeyPair } from './specs/v1/edKeyPair.nitro';\r\nimport type {\r\n BinaryLike,\r\n CFRGKeyPairType,\r\n CryptoKeyPair,\r\n DiffieHellmanCallback,\r\n DiffieHellmanOptions,\r\n GenerateKeyPairCallback,\r\n GenerateKeyPairReturn,\r\n Hex,\r\n KeyPairGenConfig,\r\n KeyUsage,\r\n SubtleAlgorithm,\r\n} from './utils';\r\nimport {\r\n binaryLikeToArrayBuffer as toAB,\r\n hasAnyNotIn,\r\n lazyDOMException,\r\n getUsagesUnion,\r\n KFormatType,\r\n KeyEncoding,\r\n} from './utils';\r\nimport { ECDH } from './ecdh';\r\n\r\nexport class Ed {\r\n type: CFRGKeyPairType;\r\n config: KeyPairGenConfig;\r\n native: EdKeyPair;\r\n\r\n constructor(type: CFRGKeyPairType, config: KeyPairGenConfig) {\r\n this.type = type;\r\n this.config = config;\r\n this.native = NitroModules.createHybridObject<EdKeyPair>('EdKeyPair');\r\n this.native.setCurve(type);\r\n }\r\n\r\n /**\r\n * Computes the Diffie-Hellman secret based on a privateKey and a publicKey.\r\n * Both keys must have the same asymmetricKeyType, which must be one of 'dh'\r\n * (for Diffie-Hellman), 'ec', 'x448', or 'x25519' (for ECDH).\r\n *\r\n * @api nodejs/node\r\n *\r\n * @param options `{ privateKey, publicKey }`, both of which are `KeyObject`s\r\n * @param callback optional `(err, secret) => void`\r\n * @returns `Buffer` if no callback, or `void` if callback is provided\r\n */\r\n diffieHellman(\r\n options: DiffieHellmanOptions,\r\n callback?: DiffieHellmanCallback,\r\n ): Buffer | void {\r\n // extract raw key bytes from KeyObject instances\r\n const privKeyObj = options.privateKey as AsymmetricKeyObject;\r\n const pubKeyObj = options.publicKey as AsymmetricKeyObject;\r\n const privateKey = privKeyObj.handle.exportKey();\r\n const publicKey = pubKeyObj.handle.exportKey();\r\n\r\n try {\r\n const ret = this.native.diffieHellman(privateKey, publicKey);\r\n if (!ret) {\r\n throw new Error('No secret');\r\n }\r\n if (callback) {\r\n callback(null, Buffer.from(ret));\r\n } else {\r\n return Buffer.from(ret);\r\n }\r\n } catch (e: unknown) {\r\n const err = e as Error;\r\n if (callback) {\r\n callback(err, undefined);\r\n } else {\r\n throw err;\r\n }\r\n }\r\n }\r\n\r\n async generateKeyPair(): Promise<void> {\r\n await this.native.generateKeyPair(\r\n this.config.publicFormat ?? -1,\r\n this.config.publicType ?? -1,\r\n this.config.privateFormat ?? -1,\r\n this.config.privateType ?? -1,\r\n this.config.cipher,\r\n this.config.passphrase as ArrayBuffer,\r\n );\r\n }\r\n\r\n generateKeyPairSync(): void {\r\n this.native.generateKeyPairSync(\r\n this.config.publicFormat ?? -1,\r\n this.config.publicType ?? -1,\r\n this.config.privateFormat ?? -1,\r\n this.config.privateType ?? -1,\r\n this.config.cipher,\r\n this.config.passphrase as ArrayBuffer,\r\n );\r\n }\r\n\r\n getPublicKey(): ArrayBuffer {\r\n return this.native.getPublicKey();\r\n }\r\n\r\n getPrivateKey(): ArrayBuffer {\r\n return this.native.getPrivateKey();\r\n }\r\n\r\n /**\r\n * Computes the Diffie-Hellman shared secret based on a privateKey and a\r\n * publicKey for key exchange\r\n *\r\n * @api \\@paulmillr/noble-curves/ed25519\r\n *\r\n * @param privateKey\r\n * @param publicKey\r\n * @returns shared secret key\r\n */\r\n getSharedSecret(privateKey: Hex, publicKey: Hex): ArrayBuffer {\r\n return this.native.diffieHellman(toAB(privateKey), toAB(publicKey));\r\n }\r\n\r\n async sign(message: BinaryLike, key?: BinaryLike): Promise<ArrayBuffer> {\r\n return key\r\n ? this.native.sign(toAB(message), toAB(key))\r\n : this.native.sign(toAB(message));\r\n }\r\n\r\n signSync(message: BinaryLike, key?: BinaryLike): ArrayBuffer {\r\n return key\r\n ? this.native.signSync(toAB(message), toAB(key))\r\n : this.native.signSync(toAB(message));\r\n }\r\n\r\n async verify(\r\n signature: BinaryLike,\r\n message: BinaryLike,\r\n key?: BinaryLike,\r\n ): Promise<boolean> {\r\n return key\r\n ? this.native.verify(toAB(signature), toAB(message), toAB(key))\r\n : this.native.verify(toAB(signature), toAB(message));\r\n }\r\n\r\n verifySync(\r\n signature: BinaryLike,\r\n message: BinaryLike,\r\n key?: BinaryLike,\r\n ): boolean {\r\n return key\r\n ? this.native.verifySync(toAB(signature), toAB(message), toAB(key))\r\n : this.native.verifySync(toAB(signature), toAB(message));\r\n }\r\n}\r\n\r\n// Node API\r\nexport function diffieHellman(\r\n options: DiffieHellmanOptions,\r\n callback?: DiffieHellmanCallback,\r\n): Buffer | void {\r\n checkDiffieHellmanOptions(options);\r\n\r\n const privateKey = options.privateKey as PrivateKeyObject;\r\n const keyType = privateKey.asymmetricKeyType;\r\n\r\n if (keyType === 'ec') {\r\n return ecDiffieHellman(options, callback);\r\n }\r\n\r\n const type = keyType as CFRGKeyPairType;\r\n const ed = new Ed(type, {});\r\n return ed.diffieHellman(options, callback);\r\n}\r\n\r\nfunction ed_createKeyObjects(ed: Ed): {\r\n pub: PublicKeyObject;\r\n priv: PrivateKeyObjectClass;\r\n} {\r\n const publicKeyData = ed.getPublicKey();\r\n const privateKeyData = ed.getPrivateKey();\r\n const pub = KeyObject.createKeyObject(\r\n 'public',\r\n publicKeyData,\r\n KFormatType.DER,\r\n KeyEncoding.SPKI,\r\n ) as PublicKeyObject;\r\n const priv = KeyObject.createKeyObject(\r\n 'private',\r\n privateKeyData,\r\n KFormatType.DER,\r\n KeyEncoding.PKCS8,\r\n ) as PrivateKeyObjectClass;\r\n return { pub, priv };\r\n}\r\n\r\n// Node API\r\nfunction ed_formatKeyPairOutput(\r\n ed: Ed,\r\n encoding: KeyPairGenConfig,\r\n): {\r\n publicKey: PublicKeyObject | string | ArrayBuffer;\r\n privateKey: PrivateKeyObjectClass | string | ArrayBuffer;\r\n} {\r\n const { publicFormat, privateFormat, cipher, passphrase } = encoding;\r\n const { pub, priv } = ed_createKeyObjects(ed);\r\n\r\n let publicKey: PublicKeyObject | string | ArrayBuffer;\r\n let privateKey: PrivateKeyObjectClass | string | ArrayBuffer;\r\n\r\n if (publicFormat == null || publicFormat === -1) {\r\n publicKey = pub;\r\n } else {\r\n const format =\r\n publicFormat === KFormatType.PEM ? KFormatType.PEM : KFormatType.DER;\r\n const exported = pub.handle.exportKey(format, KeyEncoding.SPKI);\r\n if (format === KFormatType.PEM) {\r\n publicKey = Buffer.from(new Uint8Array(exported)).toString('utf-8');\r\n } else {\r\n publicKey = exported;\r\n }\r\n }\r\n\r\n if (privateFormat == null || privateFormat === -1) {\r\n privateKey = priv;\r\n } else {\r\n const format =\r\n privateFormat === KFormatType.PEM ? KFormatType.PEM : KFormatType.DER;\r\n const exported = priv.handle.exportKey(\r\n format,\r\n KeyEncoding.PKCS8,\r\n cipher,\r\n passphrase,\r\n );\r\n if (format === KFormatType.PEM) {\r\n privateKey = Buffer.from(new Uint8Array(exported)).toString('utf-8');\r\n } else {\r\n privateKey = exported;\r\n }\r\n }\r\n\r\n return { publicKey, privateKey };\r\n}\r\n\r\nexport function ed_generateKeyPair(\r\n isAsync: boolean,\r\n type: CFRGKeyPairType,\r\n encoding: KeyPairGenConfig,\r\n callback: GenerateKeyPairCallback | undefined,\r\n): GenerateKeyPairReturn | void {\r\n const derConfig: KeyPairGenConfig = {\r\n ...encoding,\r\n publicFormat: KFormatType.DER,\r\n publicType: KeyEncoding.SPKI,\r\n privateFormat: KFormatType.DER,\r\n privateType: KeyEncoding.PKCS8,\r\n };\r\n const ed = new Ed(type, derConfig);\r\n\r\n if (isAsync) {\r\n if (!callback) {\r\n throw new Error('A callback is required for async key generation.');\r\n }\r\n ed.generateKeyPair()\r\n .then(() => {\r\n const { publicKey, privateKey } = ed_formatKeyPairOutput(ed, encoding);\r\n callback(undefined, publicKey, privateKey);\r\n })\r\n .catch(err => {\r\n callback(err, undefined, undefined);\r\n });\r\n return;\r\n }\r\n\r\n let err: Error | undefined;\r\n try {\r\n ed.generateKeyPairSync();\r\n } catch (e) {\r\n err = e instanceof Error ? e : new Error(String(e));\r\n }\r\n\r\n const { publicKey, privateKey } = err\r\n ? { publicKey: undefined, privateKey: undefined }\r\n : ed_formatKeyPairOutput(ed, encoding);\r\n\r\n if (callback) {\r\n callback(err, publicKey, privateKey);\r\n return;\r\n }\r\n return [err, publicKey, privateKey];\r\n}\r\n\r\nfunction ecDiffieHellman(\r\n options: DiffieHellmanOptions,\r\n callback?: DiffieHellmanCallback,\r\n): Buffer | void {\r\n const privateKey = options.privateKey as PrivateKeyObject;\r\n const publicKey = options.publicKey as AsymmetricKeyObject;\r\n\r\n const curveName = privateKey.namedCurve;\r\n if (!curveName) {\r\n throw new Error('Unable to determine EC curve name from private key');\r\n }\r\n\r\n const ecdh = new ECDH(curveName);\r\n\r\n const jwkPrivate = privateKey.handle.exportJwk({}, false);\r\n if (!jwkPrivate.d) throw new Error('Invalid private key');\r\n ecdh.setPrivateKey(Buffer.from(jwkPrivate.d, 'base64url'));\r\n\r\n const jwkPublic = publicKey.handle.exportJwk({}, false);\r\n if (!jwkPublic.x || !jwkPublic.y) throw new Error('Invalid public key');\r\n const x = Buffer.from(jwkPublic.x, 'base64url');\r\n const y = Buffer.from(jwkPublic.y, 'base64url');\r\n const publicBytes = Buffer.concat([Buffer.from([0x04]), x, y]);\r\n\r\n try {\r\n const secret = ecdh.computeSecret(publicBytes);\r\n if (callback) {\r\n callback(null, secret);\r\n } else {\r\n return secret;\r\n }\r\n } catch (e: unknown) {\r\n const err = e as Error;\r\n if (callback) {\r\n callback(err, undefined);\r\n } else {\r\n throw err;\r\n }\r\n }\r\n}\r\n\r\nfunction checkDiffieHellmanOptions(options: DiffieHellmanOptions): void {\r\n const { privateKey, publicKey } = options;\r\n\r\n // Check if keys are KeyObject instances\r\n if (\r\n !privateKey ||\r\n typeof privateKey !== 'object' ||\r\n !('type' in privateKey)\r\n ) {\r\n throw new Error('privateKey must be a KeyObject');\r\n }\r\n if (!publicKey || typeof publicKey !== 'object' || !('type' in publicKey)) {\r\n throw new Error('publicKey must be a KeyObject');\r\n }\r\n\r\n // type checks\r\n if (privateKey.type !== 'private') {\r\n throw new Error('privateKey must be a private KeyObject');\r\n }\r\n if (publicKey.type !== 'public') {\r\n throw new Error('publicKey must be a public KeyObject');\r\n }\r\n\r\n // For asymmetric keys, check if they have the asymmetricKeyType property\r\n const privateKeyAsym = privateKey as AsymmetricKeyObject;\r\n const publicKeyAsym = publicKey as AsymmetricKeyObject;\r\n\r\n // key types must match\r\n if (\r\n privateKeyAsym.asymmetricKeyType &&\r\n publicKeyAsym.asymmetricKeyType &&\r\n privateKeyAsym.asymmetricKeyType !== publicKeyAsym.asymmetricKeyType\r\n ) {\r\n throw new Error('Keys must be asymmetric and their types must match');\r\n }\r\n\r\n switch (privateKeyAsym.asymmetricKeyType) {\r\n // case 'dh': // TODO: uncomment when implemented\r\n case 'ec': {\r\n const privateCurve = privateKeyAsym.namedCurve;\r\n const publicCurve = publicKeyAsym.namedCurve;\r\n if (privateCurve && publicCurve && privateCurve !== publicCurve) {\r\n throw new Error('Private and public key curves do not match');\r\n }\r\n break;\r\n }\r\n case 'x25519':\r\n case 'x448':\r\n break;\r\n default:\r\n throw new Error(\r\n `Unknown curve type: ${privateKeyAsym.asymmetricKeyType}`,\r\n );\r\n }\r\n}\r\n\r\nexport async function ed_generateKeyPairWebCrypto(\r\n type: 'ed25519' | 'ed448',\r\n extractable: boolean,\r\n keyUsages: KeyUsage[],\r\n): Promise<CryptoKeyPair> {\r\n if (hasAnyNotIn(keyUsages, ['sign', 'verify'])) {\r\n throw lazyDOMException(`Unsupported key usage for ${type}`, 'SyntaxError');\r\n }\r\n\r\n const publicUsages = getUsagesUnion(keyUsages, 'verify');\r\n const privateUsages = getUsagesUnion(keyUsages, 'sign');\r\n\r\n if (privateUsages.length === 0) {\r\n throw lazyDOMException('Usages cannot be empty', 'SyntaxError');\r\n }\r\n\r\n // Request DER-encoded SPKI for public key, PKCS8 for private key\r\n const config = {\r\n publicFormat: KFormatType.DER,\r\n publicType: KeyEncoding.SPKI,\r\n privateFormat: KFormatType.DER,\r\n privateType: KeyEncoding.PKCS8,\r\n };\r\n const ed = new Ed(type, config);\r\n await ed.generateKeyPair();\r\n\r\n const algorithmName = type === 'ed25519' ? 'Ed25519' : 'Ed448';\r\n const { pub, priv } = ed_createKeyObjects(ed);\r\n\r\n const publicKey = new CryptoKey(\r\n pub,\r\n { name: algorithmName } as SubtleAlgorithm,\r\n publicUsages,\r\n true,\r\n );\r\n const privateKey = new CryptoKey(\r\n priv,\r\n { name: algorithmName } as SubtleAlgorithm,\r\n privateUsages,\r\n extractable,\r\n );\r\n\r\n return { publicKey, privateKey };\r\n}\r\n\r\nexport async function x_generateKeyPairWebCrypto(\r\n type: 'x25519' | 'x448',\r\n extractable: boolean,\r\n keyUsages: KeyUsage[],\r\n): Promise<CryptoKeyPair> {\r\n if (hasAnyNotIn(keyUsages, ['deriveKey', 'deriveBits'])) {\r\n throw lazyDOMException(`Unsupported key usage for ${type}`, 'SyntaxError');\r\n }\r\n\r\n const publicUsages = getUsagesUnion(keyUsages);\r\n const privateUsages = getUsagesUnion(keyUsages, 'deriveKey', 'deriveBits');\r\n\r\n if (privateUsages.length === 0) {\r\n throw lazyDOMException('Usages cannot be empty', 'SyntaxError');\r\n }\r\n\r\n // Request DER-encoded SPKI for public key, PKCS8 for private key\r\n const config = {\r\n publicFormat: KFormatType.DER,\r\n publicType: KeyEncoding.SPKI,\r\n privateFormat: KFormatType.DER,\r\n privateType: KeyEncoding.PKCS8,\r\n };\r\n const ed = new Ed(type, config);\r\n await ed.generateKeyPair();\r\n\r\n const algorithmName = type === 'x25519' ? 'X25519' : 'X448';\r\n const { pub, priv } = ed_createKeyObjects(ed);\r\n\r\n const publicKey = new CryptoKey(\r\n pub,\r\n { name: algorithmName } as SubtleAlgorithm,\r\n publicUsages,\r\n true,\r\n );\r\n const privateKey = new CryptoKey(\r\n priv,\r\n { name: algorithmName } as SubtleAlgorithm,\r\n privateUsages,\r\n extractable,\r\n );\r\n\r\n return { publicKey, privateKey };\r\n}\r\n\r\nexport function xDeriveBits(\r\n algorithm: SubtleAlgorithm,\r\n baseKey: CryptoKey,\r\n length: number | null,\r\n): ArrayBuffer {\r\n const publicKey = algorithm.public;\r\n\r\n if (!publicKey) {\r\n throw new Error('Public key is required for X25519/X448 derivation');\r\n }\r\n\r\n if (baseKey.algorithm.name !== publicKey.algorithm.name) {\r\n throw new Error('Keys must be of the same algorithm');\r\n }\r\n\r\n const type = baseKey.algorithm.name.toLowerCase() as 'x25519' | 'x448';\r\n const ed = new Ed(type, {});\r\n\r\n // Export raw keys\r\n const privateKeyBytes = baseKey.keyObject.handle.exportKey();\r\n const publicKeyBytes = publicKey.keyObject.handle.exportKey();\r\n\r\n const privateKeyTyped = new Uint8Array(privateKeyBytes);\r\n const publicKeyTyped = new Uint8Array(publicKeyBytes);\r\n\r\n const secret = ed.getSharedSecret(privateKeyTyped, publicKeyTyped);\r\n\r\n // If length is null, return the full secret\r\n if (length === null) {\r\n return secret;\r\n }\r\n\r\n // If length is specified, truncate\r\n const byteLength = Math.ceil(length / 8);\r\n if (secret.byteLength >= byteLength) {\r\n return secret.slice(0, byteLength);\r\n }\r\n\r\n throw new Error('Derived key is shorter than requested length');\r\n}\r\n"],"mappings":";;;;;;;;;;;AAAA,IAAAA,wBAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AAEA,IAAAE,QAAA,GAAAF,OAAA;AAoBA,IAAAG,MAAA,GAAAH,OAAA;AAQA,IAAAI,KAAA,GAAAJ,OAAA;AAA8B,SAAAK,gBAAAC,CAAA,EAAAC,CAAA,EAAAC,CAAA,YAAAD,CAAA,GAAAE,cAAA,CAAAF,CAAA,MAAAD,CAAA,GAAAI,MAAA,CAAAC,cAAA,CAAAL,CAAA,EAAAC,CAAA,IAAAK,KAAA,EAAAJ,CAAA,EAAAK,UAAA,MAAAC,YAAA,MAAAC,QAAA,UAAAT,CAAA,CAAAC,CAAA,IAAAC,CAAA,EAAAF,CAAA;AAAA,SAAAG,e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["export type ConfigProps = {\r\n /**\r\n * Enable libsodium support\r\n * @default false\r\n */\r\n sodiumEnabled?: boolean;\r\n};\r\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createRNQCPlugin = createRNQCPlugin;
|
|
7
|
+
var _configPlugins = require("expo/config-plugins");
|
|
8
|
+
var _withSodiumIos = require("./withSodiumIos");
|
|
9
|
+
var _withSodiumAndroid = require("./withSodiumAndroid");
|
|
10
|
+
var _withXCode = require("./withXCode");
|
|
11
|
+
const withRNQCInternal = (config, props = {}) => {
|
|
12
|
+
// add XCode workarounds for some 16.x releases that are not RN-friendly
|
|
13
|
+
config = (0, _withXCode.withXCode)(config, props);
|
|
14
|
+
|
|
15
|
+
// enable libsodium algorithms
|
|
16
|
+
if (props.sodiumEnabled) {
|
|
17
|
+
config = (0, _withSodiumIos.withSodiumIos)(config, props);
|
|
18
|
+
config = (0, _withSodiumAndroid.withSodiumAndroid)(config, props);
|
|
19
|
+
}
|
|
20
|
+
return config;
|
|
21
|
+
};
|
|
22
|
+
function createRNQCPlugin(name, version) {
|
|
23
|
+
return (0, _configPlugins.createRunOncePlugin)(withRNQCInternal, name, version);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=withRNQC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_configPlugins","require","_withSodiumIos","_withSodiumAndroid","_withXCode","withRNQCInternal","config","props","withXCode","sodiumEnabled","withSodiumIos","withSodiumAndroid","createRNQCPlugin","name","version","createRunOncePlugin"],"sources":["withRNQC.ts"],"sourcesContent":["import { createRunOncePlugin } from 'expo/config-plugins';\r\nimport type { ConfigPlugin } from 'expo/config-plugins';\r\nimport type { ConfigProps } from './@types';\r\nimport { withSodiumIos } from './withSodiumIos';\r\nimport { withSodiumAndroid } from './withSodiumAndroid';\r\nimport { withXCode } from './withXCode';\r\n\r\nconst withRNQCInternal: ConfigPlugin<ConfigProps> = (config, props = {}) => {\r\n // add XCode workarounds for some 16.x releases that are not RN-friendly\r\n config = withXCode(config, props);\r\n\r\n // enable libsodium algorithms\r\n if (props.sodiumEnabled) {\r\n config = withSodiumIos(config, props);\r\n config = withSodiumAndroid(config, props);\r\n }\r\n\r\n return config;\r\n};\r\n\r\nexport function createRNQCPlugin(name: string, version: string) {\r\n return createRunOncePlugin(withRNQCInternal, name, version);\r\n}\r\n"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAGA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAEA,MAAMI,gBAA2C,GAAGA,CAACC,MAAM,EAAEC,KAAK,GAAG,CAAC,CAAC,KAAK;EAC1E;EACAD,MAAM,GAAG,IAAAE,oBAAS,EAACF,MAAM,EAAEC,KAAK,CAAC;;EAEjC;EACA,IAAIA,KAAK,CAACE,aAAa,EAAE;IACvBH,MAAM,GAAG,IAAAI,4BAAa,EAACJ,MAAM,EAAEC,KAAK,CAAC;IACrCD,MAAM,GAAG,IAAAK,oCAAiB,EAACL,MAAM,EAAEC,KAAK,CAAC;EAC3C;EAEA,OAAOD,MAAM;AACf,CAAC;AAEM,SAASM,gBAAgBA,CAACC,IAAY,EAAEC,OAAe,EAAE;EAC9D,OAAO,IAAAC,kCAAmB,EAACV,gBAAgB,EAAEQ,IAAI,EAAEC,OAAO,CAAC;AAC7D","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.withSodiumAndroid = void 0;
|
|
7
|
+
var _configPlugins = require("expo/config-plugins");
|
|
8
|
+
const withSodiumAndroid = config => {
|
|
9
|
+
return (0, _configPlugins.withGradleProperties)(config, config => {
|
|
10
|
+
config.modResults = config.modResults || [];
|
|
11
|
+
|
|
12
|
+
// Check if the property already exists
|
|
13
|
+
const existingProperty = config.modResults.find(item => item.type === 'property' && item.key === 'sodiumEnabled');
|
|
14
|
+
if (!existingProperty) {
|
|
15
|
+
config.modResults.push({
|
|
16
|
+
type: 'property',
|
|
17
|
+
key: 'sodiumEnabled',
|
|
18
|
+
value: 'true'
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return config;
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
exports.withSodiumAndroid = withSodiumAndroid;
|
|
25
|
+
//# sourceMappingURL=withSodiumAndroid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_configPlugins","require","withSodiumAndroid","config","withGradleProperties","modResults","existingProperty","find","item","type","key","push","value","exports"],"sources":["withSodiumAndroid.ts"],"sourcesContent":["import type { ConfigPlugin } from 'expo/config-plugins';\r\nimport { withGradleProperties } from 'expo/config-plugins';\r\nimport type { ConfigProps } from './@types';\r\n\r\nexport const withSodiumAndroid: ConfigPlugin<ConfigProps> = config => {\r\n return withGradleProperties(config, config => {\r\n config.modResults = config.modResults || [];\r\n\r\n // Check if the property already exists\r\n const existingProperty = config.modResults.find(\r\n item => item.type === 'property' && item.key === 'sodiumEnabled',\r\n );\r\n\r\n if (!existingProperty) {\r\n config.modResults.push({\r\n type: 'property',\r\n key: 'sodiumEnabled',\r\n value: 'true',\r\n });\r\n }\r\n\r\n return config;\r\n });\r\n};\r\n"],"mappings":";;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AAGO,MAAMC,iBAA4C,GAAGC,MAAM,IAAI;EACpE,OAAO,IAAAC,mCAAoB,EAACD,MAAM,EAAEA,MAAM,IAAI;IAC5CA,MAAM,CAACE,UAAU,GAAGF,MAAM,CAACE,UAAU,IAAI,EAAE;;IAE3C;IACA,MAAMC,gBAAgB,GAAGH,MAAM,CAACE,UAAU,CAACE,IAAI,CAC7CC,IAAI,IAAIA,IAAI,CAACC,IAAI,KAAK,UAAU,IAAID,IAAI,CAACE,GAAG,KAAK,eACnD,CAAC;IAED,IAAI,CAACJ,gBAAgB,EAAE;MACrBH,MAAM,CAACE,UAAU,CAACM,IAAI,CAAC;QACrBF,IAAI,EAAE,UAAU;QAChBC,GAAG,EAAE,eAAe;QACpBE,KAAK,EAAE;MACT,CAAC,CAAC;IACJ;IAEA,OAAOT,MAAM;EACf,CAAC,CAAC;AACJ,CAAC;AAACU,OAAA,CAAAX,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.withSodiumIos = void 0;
|
|
7
|
+
var _configPlugins = require("expo/config-plugins");
|
|
8
|
+
var _fs = _interopRequireDefault(require("fs"));
|
|
9
|
+
var _path = _interopRequireDefault(require("path"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const withSodiumIos = config => {
|
|
12
|
+
return (0, _configPlugins.withDangerousMod)(config, ['ios', config => {
|
|
13
|
+
const podfilePath = _path.default.join(config.modRequest.platformProjectRoot, 'Podfile');
|
|
14
|
+
let contents = _fs.default.readFileSync(podfilePath, 'utf-8');
|
|
15
|
+
if (!contents.includes("ENV['SODIUM_ENABLED']")) {
|
|
16
|
+
contents = `ENV['SODIUM_ENABLED'] = '1'\n${contents}`;
|
|
17
|
+
_fs.default.writeFileSync(podfilePath, contents);
|
|
18
|
+
}
|
|
19
|
+
return config;
|
|
20
|
+
}]);
|
|
21
|
+
};
|
|
22
|
+
exports.withSodiumIos = withSodiumIos;
|
|
23
|
+
//# sourceMappingURL=withSodiumIos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_configPlugins","require","_fs","_interopRequireDefault","_path","e","__esModule","default","withSodiumIos","config","withDangerousMod","podfilePath","path","join","modRequest","platformProjectRoot","contents","fs","readFileSync","includes","writeFileSync","exports"],"sources":["withSodiumIos.ts"],"sourcesContent":["import type { ConfigPlugin } from 'expo/config-plugins';\r\nimport { withDangerousMod } from 'expo/config-plugins';\r\nimport fs from 'fs';\r\nimport path from 'path';\r\nimport type { ConfigProps } from './@types';\r\n\r\nexport const withSodiumIos: ConfigPlugin<ConfigProps> = config => {\r\n return withDangerousMod(config, [\r\n 'ios',\r\n config => {\r\n const podfilePath = path.join(\r\n config.modRequest.platformProjectRoot,\r\n 'Podfile',\r\n );\r\n let contents = fs.readFileSync(podfilePath, 'utf-8');\r\n\r\n if (!contents.includes(\"ENV['SODIUM_ENABLED']\")) {\r\n contents = `ENV['SODIUM_ENABLED'] = '1'\\n${contents}`;\r\n fs.writeFileSync(podfilePath, contents);\r\n }\r\n\r\n return config;\r\n },\r\n ]);\r\n};\r\n"],"mappings":";;;;;;AACA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,GAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAD,sBAAA,CAAAF,OAAA;AAAwB,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGjB,MAAMG,aAAwC,GAAGC,MAAM,IAAI;EAChE,OAAO,IAAAC,+BAAgB,EAACD,MAAM,EAAE,CAC9B,KAAK,EACLA,MAAM,IAAI;IACR,MAAME,WAAW,GAAGC,aAAI,CAACC,IAAI,CAC3BJ,MAAM,CAACK,UAAU,CAACC,mBAAmB,EACrC,SACF,CAAC;IACD,IAAIC,QAAQ,GAAGC,WAAE,CAACC,YAAY,CAACP,WAAW,EAAE,OAAO,CAAC;IAEpD,IAAI,CAACK,QAAQ,CAACG,QAAQ,CAAC,uBAAuB,CAAC,EAAE;MAC/CH,QAAQ,GAAG,gCAAgCA,QAAQ,EAAE;MACrDC,WAAE,CAACG,aAAa,CAACT,WAAW,EAAEK,QAAQ,CAAC;IACzC;IAEA,OAAOP,MAAM;EACf,CAAC,CACF,CAAC;AACJ,CAAC;AAACY,OAAA,CAAAb,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.withXCode = void 0;
|
|
7
|
+
var _expoBuildProperties = require("expo-build-properties");
|
|
8
|
+
var _configPlugins = require("expo/config-plugins");
|
|
9
|
+
var _fs = _interopRequireDefault(require("fs"));
|
|
10
|
+
var _path = _interopRequireDefault(require("path"));
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
/**
|
|
13
|
+
* Workaround for some jank XCode releases that break React Native native modules
|
|
14
|
+
*
|
|
15
|
+
* see: https://github.com/mrousavy/nitro/issues/422#issuecomment-2545988256
|
|
16
|
+
*/
|
|
17
|
+
const withXCode = config => {
|
|
18
|
+
// Use expo-build-properties to bump iOS deployment target
|
|
19
|
+
config = (0, _expoBuildProperties.withBuildProperties)(config, {
|
|
20
|
+
ios: {
|
|
21
|
+
deploymentTarget: '16.1'
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
// Patch the generated Podfile fallback to ensure platform is always 16.1
|
|
25
|
+
config = (0, _configPlugins.withDangerousMod)(config, ['ios', modConfig => {
|
|
26
|
+
const podfilePath = _path.default.join(modConfig.modRequest.platformProjectRoot, 'Podfile');
|
|
27
|
+
let contents = _fs.default.readFileSync(podfilePath, 'utf-8');
|
|
28
|
+
|
|
29
|
+
// Check if the IPHONEOS_DEPLOYMENT_TARGET setting is already present
|
|
30
|
+
// We search for the key being assigned, e.g., config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] =
|
|
31
|
+
const deploymentTargetSettingExists = /\.build_settings\s*\[\s*['"]IPHONEOS_DEPLOYMENT_TARGET['"]\s*\]\s*=/.test(contents);
|
|
32
|
+
if (!deploymentTargetSettingExists) {
|
|
33
|
+
// IPHONEOS_DEPLOYMENT_TARGET setting not found, proceed to add it.
|
|
34
|
+
contents = contents.replace(/(post_install\s+do\s+\|installer\|[\s\S]*?)(\r?\n\s\send\s*)$/m, `$1
|
|
35
|
+
|
|
36
|
+
# Expo Build Properties: force deployment target
|
|
37
|
+
# https://github.com/mrousavy/nitro/issues/422#issuecomment-2545988256
|
|
38
|
+
installer.pods_project.targets.each do |target|
|
|
39
|
+
target.build_configurations.each do |config|
|
|
40
|
+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.1'
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
$2`);
|
|
44
|
+
}
|
|
45
|
+
_fs.default.writeFileSync(podfilePath, contents);
|
|
46
|
+
return modConfig;
|
|
47
|
+
}]);
|
|
48
|
+
return config;
|
|
49
|
+
};
|
|
50
|
+
exports.withXCode = withXCode;
|
|
51
|
+
//# sourceMappingURL=withXCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_expoBuildProperties","require","_configPlugins","_fs","_interopRequireDefault","_path","e","__esModule","default","withXCode","config","withBuildProperties","ios","deploymentTarget","withDangerousMod","modConfig","podfilePath","path","join","modRequest","platformProjectRoot","contents","fs","readFileSync","deploymentTargetSettingExists","test","replace","writeFileSync","exports"],"sources":["withXCode.ts"],"sourcesContent":["import type { ConfigPlugin } from 'expo/config-plugins';\r\nimport type { ConfigProps } from './@types';\r\nimport { withBuildProperties } from 'expo-build-properties';\r\nimport { withDangerousMod } from 'expo/config-plugins';\r\nimport fs from 'fs';\r\nimport path from 'path';\r\n\r\n/**\r\n * Workaround for some jank XCode releases that break React Native native modules\r\n *\r\n * see: https://github.com/mrousavy/nitro/issues/422#issuecomment-2545988256\r\n */\r\nexport const withXCode: ConfigPlugin<ConfigProps> = config => {\r\n // Use expo-build-properties to bump iOS deployment target\r\n config = withBuildProperties(config, { ios: { deploymentTarget: '16.1' } });\r\n // Patch the generated Podfile fallback to ensure platform is always 16.1\r\n config = withDangerousMod(config, [\r\n 'ios',\r\n modConfig => {\r\n const podfilePath = path.join(\r\n modConfig.modRequest.platformProjectRoot,\r\n 'Podfile',\r\n );\r\n let contents = fs.readFileSync(podfilePath, 'utf-8');\r\n\r\n // Check if the IPHONEOS_DEPLOYMENT_TARGET setting is already present\r\n // We search for the key being assigned, e.g., config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] =\r\n const deploymentTargetSettingExists =\r\n /\\.build_settings\\s*\\[\\s*['\"]IPHONEOS_DEPLOYMENT_TARGET['\"]\\s*\\]\\s*=/.test(\r\n contents,\r\n );\r\n\r\n if (!deploymentTargetSettingExists) {\r\n // IPHONEOS_DEPLOYMENT_TARGET setting not found, proceed to add it.\r\n contents = contents.replace(\r\n /(post_install\\s+do\\s+\\|installer\\|[\\s\\S]*?)(\\r?\\n\\s\\send\\s*)$/m,\r\n `$1\r\n\r\n # Expo Build Properties: force deployment target\r\n # https://github.com/mrousavy/nitro/issues/422#issuecomment-2545988256\r\n installer.pods_project.targets.each do |target|\r\n target.build_configurations.each do |config|\r\n config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.1'\r\n end\r\n end\r\n$2`,\r\n );\r\n }\r\n\r\n fs.writeFileSync(podfilePath, contents);\r\n return modConfig;\r\n },\r\n ]);\r\n return config;\r\n};\r\n"],"mappings":";;;;;;AAEA,IAAAA,oBAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,GAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,KAAA,GAAAD,sBAAA,CAAAH,OAAA;AAAwB,SAAAG,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAExB;AACA;AACA;AACA;AACA;AACO,MAAMG,SAAoC,GAAGC,MAAM,IAAI;EAC5D;EACAA,MAAM,GAAG,IAAAC,wCAAmB,EAACD,MAAM,EAAE;IAAEE,GAAG,EAAE;MAAEC,gBAAgB,EAAE;IAAO;EAAE,CAAC,CAAC;EAC3E;EACAH,MAAM,GAAG,IAAAI,+BAAgB,EAACJ,MAAM,EAAE,CAChC,KAAK,EACLK,SAAS,IAAI;IACX,MAAMC,WAAW,GAAGC,aAAI,CAACC,IAAI,CAC3BH,SAAS,CAACI,UAAU,CAACC,mBAAmB,EACxC,SACF,CAAC;IACD,IAAIC,QAAQ,GAAGC,WAAE,CAACC,YAAY,CAACP,WAAW,EAAE,OAAO,CAAC;;IAEpD;IACA;IACA,MAAMQ,6BAA6B,GACjC,qEAAqE,CAACC,IAAI,CACxEJ,QACF,CAAC;IAEH,IAAI,CAACG,6BAA6B,EAAE;MAClC;MACAH,QAAQ,GAAGA,QAAQ,CAACK,OAAO,CACzB,gEAAgE,EAChE;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACQ,CAAC;IACH;IAEAJ,WAAE,CAACK,aAAa,CAACX,WAAW,EAAEK,QAAQ,CAAC;IACvC,OAAON,SAAS;EAClB,CAAC,CACF,CAAC;EACF,OAAOL,MAAM;AACf,CAAC;AAACkB,OAAA,CAAAnB,SAAA,GAAAA,SAAA","ignoreList":[]}
|