@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,383 @@
|
|
|
1
|
+
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; }
|
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
|
+
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); }
|
|
4
|
+
import { NitroModules } from 'react-native-nitro-modules';
|
|
5
|
+
import { Buffer } from '@craftzdog/react-native-buffer';
|
|
6
|
+
import { CryptoKey, KeyObject } from './keys/classes';
|
|
7
|
+
import { binaryLikeToArrayBuffer as toAB, hasAnyNotIn, lazyDOMException, getUsagesUnion, KFormatType, KeyEncoding } from './utils';
|
|
8
|
+
import { ECDH } from './ecdh';
|
|
9
|
+
export class Ed {
|
|
10
|
+
constructor(type, config) {
|
|
11
|
+
_defineProperty(this, "type", void 0);
|
|
12
|
+
_defineProperty(this, "config", void 0);
|
|
13
|
+
_defineProperty(this, "native", void 0);
|
|
14
|
+
this.type = type;
|
|
15
|
+
this.config = config;
|
|
16
|
+
this.native = NitroModules.createHybridObject('EdKeyPair');
|
|
17
|
+
this.native.setCurve(type);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Computes the Diffie-Hellman secret based on a privateKey and a publicKey.
|
|
22
|
+
* Both keys must have the same asymmetricKeyType, which must be one of 'dh'
|
|
23
|
+
* (for Diffie-Hellman), 'ec', 'x448', or 'x25519' (for ECDH).
|
|
24
|
+
*
|
|
25
|
+
* @api nodejs/node
|
|
26
|
+
*
|
|
27
|
+
* @param options `{ privateKey, publicKey }`, both of which are `KeyObject`s
|
|
28
|
+
* @param callback optional `(err, secret) => void`
|
|
29
|
+
* @returns `Buffer` if no callback, or `void` if callback is provided
|
|
30
|
+
*/
|
|
31
|
+
diffieHellman(options, callback) {
|
|
32
|
+
// extract raw key bytes from KeyObject instances
|
|
33
|
+
const privKeyObj = options.privateKey;
|
|
34
|
+
const pubKeyObj = options.publicKey;
|
|
35
|
+
const privateKey = privKeyObj.handle.exportKey();
|
|
36
|
+
const publicKey = pubKeyObj.handle.exportKey();
|
|
37
|
+
try {
|
|
38
|
+
const ret = this.native.diffieHellman(privateKey, publicKey);
|
|
39
|
+
if (!ret) {
|
|
40
|
+
throw new Error('No secret');
|
|
41
|
+
}
|
|
42
|
+
if (callback) {
|
|
43
|
+
callback(null, Buffer.from(ret));
|
|
44
|
+
} else {
|
|
45
|
+
return Buffer.from(ret);
|
|
46
|
+
}
|
|
47
|
+
} catch (e) {
|
|
48
|
+
const err = e;
|
|
49
|
+
if (callback) {
|
|
50
|
+
callback(err, undefined);
|
|
51
|
+
} else {
|
|
52
|
+
throw err;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
async generateKeyPair() {
|
|
57
|
+
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);
|
|
58
|
+
}
|
|
59
|
+
generateKeyPairSync() {
|
|
60
|
+
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);
|
|
61
|
+
}
|
|
62
|
+
getPublicKey() {
|
|
63
|
+
return this.native.getPublicKey();
|
|
64
|
+
}
|
|
65
|
+
getPrivateKey() {
|
|
66
|
+
return this.native.getPrivateKey();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Computes the Diffie-Hellman shared secret based on a privateKey and a
|
|
71
|
+
* publicKey for key exchange
|
|
72
|
+
*
|
|
73
|
+
* @api \@paulmillr/noble-curves/ed25519
|
|
74
|
+
*
|
|
75
|
+
* @param privateKey
|
|
76
|
+
* @param publicKey
|
|
77
|
+
* @returns shared secret key
|
|
78
|
+
*/
|
|
79
|
+
getSharedSecret(privateKey, publicKey) {
|
|
80
|
+
return this.native.diffieHellman(toAB(privateKey), toAB(publicKey));
|
|
81
|
+
}
|
|
82
|
+
async sign(message, key) {
|
|
83
|
+
return key ? this.native.sign(toAB(message), toAB(key)) : this.native.sign(toAB(message));
|
|
84
|
+
}
|
|
85
|
+
signSync(message, key) {
|
|
86
|
+
return key ? this.native.signSync(toAB(message), toAB(key)) : this.native.signSync(toAB(message));
|
|
87
|
+
}
|
|
88
|
+
async verify(signature, message, key) {
|
|
89
|
+
return key ? this.native.verify(toAB(signature), toAB(message), toAB(key)) : this.native.verify(toAB(signature), toAB(message));
|
|
90
|
+
}
|
|
91
|
+
verifySync(signature, message, key) {
|
|
92
|
+
return key ? this.native.verifySync(toAB(signature), toAB(message), toAB(key)) : this.native.verifySync(toAB(signature), toAB(message));
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
// Node API
|
|
97
|
+
export function diffieHellman(options, callback) {
|
|
98
|
+
checkDiffieHellmanOptions(options);
|
|
99
|
+
const privateKey = options.privateKey;
|
|
100
|
+
const keyType = privateKey.asymmetricKeyType;
|
|
101
|
+
if (keyType === 'ec') {
|
|
102
|
+
return ecDiffieHellman(options, callback);
|
|
103
|
+
}
|
|
104
|
+
const type = keyType;
|
|
105
|
+
const ed = new Ed(type, {});
|
|
106
|
+
return ed.diffieHellman(options, callback);
|
|
107
|
+
}
|
|
108
|
+
function ed_createKeyObjects(ed) {
|
|
109
|
+
const publicKeyData = ed.getPublicKey();
|
|
110
|
+
const privateKeyData = ed.getPrivateKey();
|
|
111
|
+
const pub = KeyObject.createKeyObject('public', publicKeyData, KFormatType.DER, KeyEncoding.SPKI);
|
|
112
|
+
const priv = KeyObject.createKeyObject('private', privateKeyData, KFormatType.DER, KeyEncoding.PKCS8);
|
|
113
|
+
return {
|
|
114
|
+
pub,
|
|
115
|
+
priv
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Node API
|
|
120
|
+
function ed_formatKeyPairOutput(ed, encoding) {
|
|
121
|
+
const {
|
|
122
|
+
publicFormat,
|
|
123
|
+
privateFormat,
|
|
124
|
+
cipher,
|
|
125
|
+
passphrase
|
|
126
|
+
} = encoding;
|
|
127
|
+
const {
|
|
128
|
+
pub,
|
|
129
|
+
priv
|
|
130
|
+
} = ed_createKeyObjects(ed);
|
|
131
|
+
let publicKey;
|
|
132
|
+
let privateKey;
|
|
133
|
+
if (publicFormat == null || publicFormat === -1) {
|
|
134
|
+
publicKey = pub;
|
|
135
|
+
} else {
|
|
136
|
+
const format = publicFormat === KFormatType.PEM ? KFormatType.PEM : KFormatType.DER;
|
|
137
|
+
const exported = pub.handle.exportKey(format, KeyEncoding.SPKI);
|
|
138
|
+
if (format === KFormatType.PEM) {
|
|
139
|
+
publicKey = Buffer.from(new Uint8Array(exported)).toString('utf-8');
|
|
140
|
+
} else {
|
|
141
|
+
publicKey = exported;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (privateFormat == null || privateFormat === -1) {
|
|
145
|
+
privateKey = priv;
|
|
146
|
+
} else {
|
|
147
|
+
const format = privateFormat === KFormatType.PEM ? KFormatType.PEM : KFormatType.DER;
|
|
148
|
+
const exported = priv.handle.exportKey(format, KeyEncoding.PKCS8, cipher, passphrase);
|
|
149
|
+
if (format === KFormatType.PEM) {
|
|
150
|
+
privateKey = Buffer.from(new Uint8Array(exported)).toString('utf-8');
|
|
151
|
+
} else {
|
|
152
|
+
privateKey = exported;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
return {
|
|
156
|
+
publicKey,
|
|
157
|
+
privateKey
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
export function ed_generateKeyPair(isAsync, type, encoding, callback) {
|
|
161
|
+
const derConfig = {
|
|
162
|
+
...encoding,
|
|
163
|
+
publicFormat: KFormatType.DER,
|
|
164
|
+
publicType: KeyEncoding.SPKI,
|
|
165
|
+
privateFormat: KFormatType.DER,
|
|
166
|
+
privateType: KeyEncoding.PKCS8
|
|
167
|
+
};
|
|
168
|
+
const ed = new Ed(type, derConfig);
|
|
169
|
+
if (isAsync) {
|
|
170
|
+
if (!callback) {
|
|
171
|
+
throw new Error('A callback is required for async key generation.');
|
|
172
|
+
}
|
|
173
|
+
ed.generateKeyPair().then(() => {
|
|
174
|
+
const {
|
|
175
|
+
publicKey,
|
|
176
|
+
privateKey
|
|
177
|
+
} = ed_formatKeyPairOutput(ed, encoding);
|
|
178
|
+
callback(undefined, publicKey, privateKey);
|
|
179
|
+
}).catch(err => {
|
|
180
|
+
callback(err, undefined, undefined);
|
|
181
|
+
});
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
let err;
|
|
185
|
+
try {
|
|
186
|
+
ed.generateKeyPairSync();
|
|
187
|
+
} catch (e) {
|
|
188
|
+
err = e instanceof Error ? e : new Error(String(e));
|
|
189
|
+
}
|
|
190
|
+
const {
|
|
191
|
+
publicKey,
|
|
192
|
+
privateKey
|
|
193
|
+
} = err ? {
|
|
194
|
+
publicKey: undefined,
|
|
195
|
+
privateKey: undefined
|
|
196
|
+
} : ed_formatKeyPairOutput(ed, encoding);
|
|
197
|
+
if (callback) {
|
|
198
|
+
callback(err, publicKey, privateKey);
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
return [err, publicKey, privateKey];
|
|
202
|
+
}
|
|
203
|
+
function ecDiffieHellman(options, callback) {
|
|
204
|
+
const privateKey = options.privateKey;
|
|
205
|
+
const publicKey = options.publicKey;
|
|
206
|
+
const curveName = privateKey.namedCurve;
|
|
207
|
+
if (!curveName) {
|
|
208
|
+
throw new Error('Unable to determine EC curve name from private key');
|
|
209
|
+
}
|
|
210
|
+
const ecdh = new ECDH(curveName);
|
|
211
|
+
const jwkPrivate = privateKey.handle.exportJwk({}, false);
|
|
212
|
+
if (!jwkPrivate.d) throw new Error('Invalid private key');
|
|
213
|
+
ecdh.setPrivateKey(Buffer.from(jwkPrivate.d, 'base64url'));
|
|
214
|
+
const jwkPublic = publicKey.handle.exportJwk({}, false);
|
|
215
|
+
if (!jwkPublic.x || !jwkPublic.y) throw new Error('Invalid public key');
|
|
216
|
+
const x = Buffer.from(jwkPublic.x, 'base64url');
|
|
217
|
+
const y = Buffer.from(jwkPublic.y, 'base64url');
|
|
218
|
+
const publicBytes = Buffer.concat([Buffer.from([0x04]), x, y]);
|
|
219
|
+
try {
|
|
220
|
+
const secret = ecdh.computeSecret(publicBytes);
|
|
221
|
+
if (callback) {
|
|
222
|
+
callback(null, secret);
|
|
223
|
+
} else {
|
|
224
|
+
return secret;
|
|
225
|
+
}
|
|
226
|
+
} catch (e) {
|
|
227
|
+
const err = e;
|
|
228
|
+
if (callback) {
|
|
229
|
+
callback(err, undefined);
|
|
230
|
+
} else {
|
|
231
|
+
throw err;
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
function checkDiffieHellmanOptions(options) {
|
|
236
|
+
const {
|
|
237
|
+
privateKey,
|
|
238
|
+
publicKey
|
|
239
|
+
} = options;
|
|
240
|
+
|
|
241
|
+
// Check if keys are KeyObject instances
|
|
242
|
+
if (!privateKey || typeof privateKey !== 'object' || !('type' in privateKey)) {
|
|
243
|
+
throw new Error('privateKey must be a KeyObject');
|
|
244
|
+
}
|
|
245
|
+
if (!publicKey || typeof publicKey !== 'object' || !('type' in publicKey)) {
|
|
246
|
+
throw new Error('publicKey must be a KeyObject');
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
// type checks
|
|
250
|
+
if (privateKey.type !== 'private') {
|
|
251
|
+
throw new Error('privateKey must be a private KeyObject');
|
|
252
|
+
}
|
|
253
|
+
if (publicKey.type !== 'public') {
|
|
254
|
+
throw new Error('publicKey must be a public KeyObject');
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// For asymmetric keys, check if they have the asymmetricKeyType property
|
|
258
|
+
const privateKeyAsym = privateKey;
|
|
259
|
+
const publicKeyAsym = publicKey;
|
|
260
|
+
|
|
261
|
+
// key types must match
|
|
262
|
+
if (privateKeyAsym.asymmetricKeyType && publicKeyAsym.asymmetricKeyType && privateKeyAsym.asymmetricKeyType !== publicKeyAsym.asymmetricKeyType) {
|
|
263
|
+
throw new Error('Keys must be asymmetric and their types must match');
|
|
264
|
+
}
|
|
265
|
+
switch (privateKeyAsym.asymmetricKeyType) {
|
|
266
|
+
// case 'dh': // TODO: uncomment when implemented
|
|
267
|
+
case 'ec':
|
|
268
|
+
{
|
|
269
|
+
const privateCurve = privateKeyAsym.namedCurve;
|
|
270
|
+
const publicCurve = publicKeyAsym.namedCurve;
|
|
271
|
+
if (privateCurve && publicCurve && privateCurve !== publicCurve) {
|
|
272
|
+
throw new Error('Private and public key curves do not match');
|
|
273
|
+
}
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
case 'x25519':
|
|
277
|
+
case 'x448':
|
|
278
|
+
break;
|
|
279
|
+
default:
|
|
280
|
+
throw new Error(`Unknown curve type: ${privateKeyAsym.asymmetricKeyType}`);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
export async function ed_generateKeyPairWebCrypto(type, extractable, keyUsages) {
|
|
284
|
+
if (hasAnyNotIn(keyUsages, ['sign', 'verify'])) {
|
|
285
|
+
throw lazyDOMException(`Unsupported key usage for ${type}`, 'SyntaxError');
|
|
286
|
+
}
|
|
287
|
+
const publicUsages = getUsagesUnion(keyUsages, 'verify');
|
|
288
|
+
const privateUsages = getUsagesUnion(keyUsages, 'sign');
|
|
289
|
+
if (privateUsages.length === 0) {
|
|
290
|
+
throw lazyDOMException('Usages cannot be empty', 'SyntaxError');
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
// Request DER-encoded SPKI for public key, PKCS8 for private key
|
|
294
|
+
const config = {
|
|
295
|
+
publicFormat: KFormatType.DER,
|
|
296
|
+
publicType: KeyEncoding.SPKI,
|
|
297
|
+
privateFormat: KFormatType.DER,
|
|
298
|
+
privateType: KeyEncoding.PKCS8
|
|
299
|
+
};
|
|
300
|
+
const ed = new Ed(type, config);
|
|
301
|
+
await ed.generateKeyPair();
|
|
302
|
+
const algorithmName = type === 'ed25519' ? 'Ed25519' : 'Ed448';
|
|
303
|
+
const {
|
|
304
|
+
pub,
|
|
305
|
+
priv
|
|
306
|
+
} = ed_createKeyObjects(ed);
|
|
307
|
+
const publicKey = new CryptoKey(pub, {
|
|
308
|
+
name: algorithmName
|
|
309
|
+
}, publicUsages, true);
|
|
310
|
+
const privateKey = new CryptoKey(priv, {
|
|
311
|
+
name: algorithmName
|
|
312
|
+
}, privateUsages, extractable);
|
|
313
|
+
return {
|
|
314
|
+
publicKey,
|
|
315
|
+
privateKey
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
export async function x_generateKeyPairWebCrypto(type, extractable, keyUsages) {
|
|
319
|
+
if (hasAnyNotIn(keyUsages, ['deriveKey', 'deriveBits'])) {
|
|
320
|
+
throw lazyDOMException(`Unsupported key usage for ${type}`, 'SyntaxError');
|
|
321
|
+
}
|
|
322
|
+
const publicUsages = getUsagesUnion(keyUsages);
|
|
323
|
+
const privateUsages = getUsagesUnion(keyUsages, 'deriveKey', 'deriveBits');
|
|
324
|
+
if (privateUsages.length === 0) {
|
|
325
|
+
throw lazyDOMException('Usages cannot be empty', 'SyntaxError');
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
// Request DER-encoded SPKI for public key, PKCS8 for private key
|
|
329
|
+
const config = {
|
|
330
|
+
publicFormat: KFormatType.DER,
|
|
331
|
+
publicType: KeyEncoding.SPKI,
|
|
332
|
+
privateFormat: KFormatType.DER,
|
|
333
|
+
privateType: KeyEncoding.PKCS8
|
|
334
|
+
};
|
|
335
|
+
const ed = new Ed(type, config);
|
|
336
|
+
await ed.generateKeyPair();
|
|
337
|
+
const algorithmName = type === 'x25519' ? 'X25519' : 'X448';
|
|
338
|
+
const {
|
|
339
|
+
pub,
|
|
340
|
+
priv
|
|
341
|
+
} = ed_createKeyObjects(ed);
|
|
342
|
+
const publicKey = new CryptoKey(pub, {
|
|
343
|
+
name: algorithmName
|
|
344
|
+
}, publicUsages, true);
|
|
345
|
+
const privateKey = new CryptoKey(priv, {
|
|
346
|
+
name: algorithmName
|
|
347
|
+
}, privateUsages, extractable);
|
|
348
|
+
return {
|
|
349
|
+
publicKey,
|
|
350
|
+
privateKey
|
|
351
|
+
};
|
|
352
|
+
}
|
|
353
|
+
export function xDeriveBits(algorithm, baseKey, length) {
|
|
354
|
+
const publicKey = algorithm.public;
|
|
355
|
+
if (!publicKey) {
|
|
356
|
+
throw new Error('Public key is required for X25519/X448 derivation');
|
|
357
|
+
}
|
|
358
|
+
if (baseKey.algorithm.name !== publicKey.algorithm.name) {
|
|
359
|
+
throw new Error('Keys must be of the same algorithm');
|
|
360
|
+
}
|
|
361
|
+
const type = baseKey.algorithm.name.toLowerCase();
|
|
362
|
+
const ed = new Ed(type, {});
|
|
363
|
+
|
|
364
|
+
// Export raw keys
|
|
365
|
+
const privateKeyBytes = baseKey.keyObject.handle.exportKey();
|
|
366
|
+
const publicKeyBytes = publicKey.keyObject.handle.exportKey();
|
|
367
|
+
const privateKeyTyped = new Uint8Array(privateKeyBytes);
|
|
368
|
+
const publicKeyTyped = new Uint8Array(publicKeyBytes);
|
|
369
|
+
const secret = ed.getSharedSecret(privateKeyTyped, publicKeyTyped);
|
|
370
|
+
|
|
371
|
+
// If length is null, return the full secret
|
|
372
|
+
if (length === null) {
|
|
373
|
+
return secret;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
// If length is specified, truncate
|
|
377
|
+
const byteLength = Math.ceil(length / 8);
|
|
378
|
+
if (secret.byteLength >= byteLength) {
|
|
379
|
+
return secret.slice(0, byteLength);
|
|
380
|
+
}
|
|
381
|
+
throw new Error('Derived key is shorter than requested length');
|
|
382
|
+
}
|
|
383
|
+
//# sourceMappingURL=ed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NitroModules","Buffer","CryptoKey","KeyObject","binaryLikeToArrayBuffer","toAB","hasAnyNotIn","lazyDOMException","getUsagesUnion","KFormatType","KeyEncoding","ECDH","Ed","constructor","type","config","_defineProperty","native","createHybridObject","setCurve","diffieHellman","options","callback","privKeyObj","privateKey","pubKeyObj","publicKey","handle","exportKey","ret","Error","from","e","err","undefined","generateKeyPair","publicFormat","publicType","privateFormat","privateType","cipher","passphrase","generateKeyPairSync","getPublicKey","getPrivateKey","getSharedSecret","sign","message","key","signSync","verify","signature","verifySync","checkDiffieHellmanOptions","keyType","asymmetricKeyType","ecDiffieHellman","ed","ed_createKeyObjects","publicKeyData","privateKeyData","pub","createKeyObject","DER","SPKI","priv","PKCS8","ed_formatKeyPairOutput","encoding","format","PEM","exported","Uint8Array","toString","ed_generateKeyPair","isAsync","derConfig","then","catch","String","curveName","namedCurve","ecdh","jwkPrivate","exportJwk","d","setPrivateKey","jwkPublic","x","y","publicBytes","concat","secret","computeSecret","privateKeyAsym","publicKeyAsym","privateCurve","publicCurve","ed_generateKeyPairWebCrypto","extractable","keyUsages","publicUsages","privateUsages","length","algorithmName","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,SAASA,YAAY,QAAQ,4BAA4B;AACzD,SAASC,MAAM,QAAQ,gCAAgC;AAEvD,SACEC,SAAS,EACTC,SAAS,QAGJ,gBAAgB;AAevB,SACEC,uBAAuB,IAAIC,IAAI,EAC/BC,WAAW,EACXC,gBAAgB,EAChBC,cAAc,EACdC,WAAW,EACXC,WAAW,QACN,SAAS;AAChB,SAASC,IAAI,QAAQ,QAAQ;AAE7B,OAAO,MAAMC,EAAE,CAAC;EAKdC,WAAWA,CAACC,IAAqB,EAAEC,MAAwB,EAAE;IAAAC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAC3D,IAAI,CAACF,IAAI,GAAGA,IAAI;IAChB,IAAI,CAACC,MAAM,GAAGA,MA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AC;EAErD,MAAMtB,MAAM,GAAGnC,EAAE,CAACZ,eAAe,CAACsE,eAAe,EAAEC,cAAc,CAAC;;EAElE;EACA,IAAIb,MAAM,KAAK,IAAI,EAAE;IACnB,OAAOX,MAAM;EACf;;EAEA;EACA,MAAMyB,UAAU,GAAGC,IAAI,CAACC,IAAI,CAAChB,MAAM,GAAG,CAAC,CAAC;EACxC,IAAIX,MAAM,CAACyB,UAAU,IAAIA,UAAU,EAAE;IACnC,OAAOzB,MAAM,CAAC4B,KAAK,CAAC,CAAC,EAAEH,UAAU,CAAC;EACpC;EAEA,MAAM,IAAIvF,KAAK,CAAC,8CAA8C,CAAC;AACjE","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["@types.ts"],"sourcesContent":["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,19 @@
|
|
|
1
|
+
import { createRunOncePlugin } from 'expo/config-plugins';
|
|
2
|
+
import { withSodiumIos } from './withSodiumIos';
|
|
3
|
+
import { withSodiumAndroid } from './withSodiumAndroid';
|
|
4
|
+
import { withXCode } from './withXCode';
|
|
5
|
+
const withRNQCInternal = (config, props = {}) => {
|
|
6
|
+
// add XCode workarounds for some 16.x releases that are not RN-friendly
|
|
7
|
+
config = withXCode(config, props);
|
|
8
|
+
|
|
9
|
+
// enable libsodium algorithms
|
|
10
|
+
if (props.sodiumEnabled) {
|
|
11
|
+
config = withSodiumIos(config, props);
|
|
12
|
+
config = withSodiumAndroid(config, props);
|
|
13
|
+
}
|
|
14
|
+
return config;
|
|
15
|
+
};
|
|
16
|
+
export function createRNQCPlugin(name, version) {
|
|
17
|
+
return createRunOncePlugin(withRNQCInternal, name, version);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=withRNQC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["createRunOncePlugin","withSodiumIos","withSodiumAndroid","withXCode","withRNQCInternal","config","props","sodiumEnabled","createRNQCPlugin","name","version"],"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,SAASA,mBAAmB,QAAQ,qBAAqB;AAGzD,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SAASC,iBAAiB,QAAQ,qBAAqB;AACvD,SAASC,SAAS,QAAQ,aAAa;AAEvC,MAAMC,gBAA2C,GAAGA,CAACC,MAAM,EAAEC,KAAK,GAAG,CAAC,CAAC,KAAK;EAC1E;EACAD,MAAM,GAAGF,SAAS,CAACE,MAAM,EAAEC,KAAK,CAAC;;EAEjC;EACA,IAAIA,KAAK,CAACC,aAAa,EAAE;IACvBF,MAAM,GAAGJ,aAAa,CAACI,MAAM,EAAEC,KAAK,CAAC;IACrCD,MAAM,GAAGH,iBAAiB,CAACG,MAAM,EAAEC,KAAK,CAAC;EAC3C;EAEA,OAAOD,MAAM;AACf,CAAC;AAED,OAAO,SAASG,gBAAgBA,CAACC,IAAY,EAAEC,OAAe,EAAE;EAC9D,OAAOV,mBAAmB,CAACI,gBAAgB,EAAEK,IAAI,EAAEC,OAAO,CAAC;AAC7D","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { withGradleProperties } from 'expo/config-plugins';
|
|
2
|
+
export const withSodiumAndroid = config => {
|
|
3
|
+
return withGradleProperties(config, config => {
|
|
4
|
+
config.modResults = config.modResults || [];
|
|
5
|
+
|
|
6
|
+
// Check if the property already exists
|
|
7
|
+
const existingProperty = config.modResults.find(item => item.type === 'property' && item.key === 'sodiumEnabled');
|
|
8
|
+
if (!existingProperty) {
|
|
9
|
+
config.modResults.push({
|
|
10
|
+
type: 'property',
|
|
11
|
+
key: 'sodiumEnabled',
|
|
12
|
+
value: 'true'
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return config;
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=withSodiumAndroid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["withGradleProperties","withSodiumAndroid","config","modResults","existingProperty","find","item","type","key","push","value"],"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,SAASA,oBAAoB,QAAQ,qBAAqB;AAG1D,OAAO,MAAMC,iBAA4C,GAAGC,MAAM,IAAI;EACpE,OAAOF,oBAAoB,CAACE,MAAM,EAAEA,MAAM,IAAI;IAC5CA,MAAM,CAACC,UAAU,GAAGD,MAAM,CAACC,UAAU,IAAI,EAAE;;IAE3C;IACA,MAAMC,gBAAgB,GAAGF,MAAM,CAACC,UAAU,CAACE,IAAI,CAC7CC,IAAI,IAAIA,IAAI,CAACC,IAAI,KAAK,UAAU,IAAID,IAAI,CAACE,GAAG,KAAK,eACnD,CAAC;IAED,IAAI,CAACJ,gBAAgB,EAAE;MACrBF,MAAM,CAACC,UAAU,CAACM,IAAI,CAAC;QACrBF,IAAI,EAAE,UAAU;QAChBC,GAAG,EAAE,eAAe;QACpBE,KAAK,EAAE;MACT,CAAC,CAAC;IACJ;IAEA,OAAOR,MAAM;EACf,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { withDangerousMod } from 'expo/config-plugins';
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
export const withSodiumIos = config => {
|
|
5
|
+
return withDangerousMod(config, ['ios', config => {
|
|
6
|
+
const podfilePath = path.join(config.modRequest.platformProjectRoot, 'Podfile');
|
|
7
|
+
let contents = fs.readFileSync(podfilePath, 'utf-8');
|
|
8
|
+
if (!contents.includes("ENV['SODIUM_ENABLED']")) {
|
|
9
|
+
contents = `ENV['SODIUM_ENABLED'] = '1'\n${contents}`;
|
|
10
|
+
fs.writeFileSync(podfilePath, contents);
|
|
11
|
+
}
|
|
12
|
+
return config;
|
|
13
|
+
}]);
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=withSodiumIos.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["withDangerousMod","fs","path","withSodiumIos","config","podfilePath","join","modRequest","platformProjectRoot","contents","readFileSync","includes","writeFileSync"],"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,SAASA,gBAAgB,QAAQ,qBAAqB;AACtD,OAAOC,EAAE,MAAM,IAAI;AACnB,OAAOC,IAAI,MAAM,MAAM;AAGvB,OAAO,MAAMC,aAAwC,GAAGC,MAAM,IAAI;EAChE,OAAOJ,gBAAgB,CAACI,MAAM,EAAE,CAC9B,KAAK,EACLA,MAAM,IAAI;IACR,MAAMC,WAAW,GAAGH,IAAI,CAACI,IAAI,CAC3BF,MAAM,CAACG,UAAU,CAACC,mBAAmB,EACrC,SACF,CAAC;IACD,IAAIC,QAAQ,GAAGR,EAAE,CAACS,YAAY,CAACL,WAAW,EAAE,OAAO,CAAC;IAEpD,IAAI,CAACI,QAAQ,CAACE,QAAQ,CAAC,uBAAuB,CAAC,EAAE;MAC/CF,QAAQ,GAAG,gCAAgCA,QAAQ,EAAE;MACrDR,EAAE,CAACW,aAAa,CAACP,WAAW,EAAEI,QAAQ,CAAC;IACzC;IAEA,OAAOL,MAAM;EACf,CAAC,CACF,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { withBuildProperties } from 'expo-build-properties';
|
|
2
|
+
import { withDangerousMod } from 'expo/config-plugins';
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Workaround for some jank XCode releases that break React Native native modules
|
|
8
|
+
*
|
|
9
|
+
* see: https://github.com/mrousavy/nitro/issues/422#issuecomment-2545988256
|
|
10
|
+
*/
|
|
11
|
+
export const withXCode = config => {
|
|
12
|
+
// Use expo-build-properties to bump iOS deployment target
|
|
13
|
+
config = withBuildProperties(config, {
|
|
14
|
+
ios: {
|
|
15
|
+
deploymentTarget: '16.1'
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
// Patch the generated Podfile fallback to ensure platform is always 16.1
|
|
19
|
+
config = withDangerousMod(config, ['ios', modConfig => {
|
|
20
|
+
const podfilePath = path.join(modConfig.modRequest.platformProjectRoot, 'Podfile');
|
|
21
|
+
let contents = fs.readFileSync(podfilePath, 'utf-8');
|
|
22
|
+
|
|
23
|
+
// Check if the IPHONEOS_DEPLOYMENT_TARGET setting is already present
|
|
24
|
+
// We search for the key being assigned, e.g., config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] =
|
|
25
|
+
const deploymentTargetSettingExists = /\.build_settings\s*\[\s*['"]IPHONEOS_DEPLOYMENT_TARGET['"]\s*\]\s*=/.test(contents);
|
|
26
|
+
if (!deploymentTargetSettingExists) {
|
|
27
|
+
// IPHONEOS_DEPLOYMENT_TARGET setting not found, proceed to add it.
|
|
28
|
+
contents = contents.replace(/(post_install\s+do\s+\|installer\|[\s\S]*?)(\r?\n\s\send\s*)$/m, `$1
|
|
29
|
+
|
|
30
|
+
# Expo Build Properties: force deployment target
|
|
31
|
+
# https://github.com/mrousavy/nitro/issues/422#issuecomment-2545988256
|
|
32
|
+
installer.pods_project.targets.each do |target|
|
|
33
|
+
target.build_configurations.each do |config|
|
|
34
|
+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.1'
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
$2`);
|
|
38
|
+
}
|
|
39
|
+
fs.writeFileSync(podfilePath, contents);
|
|
40
|
+
return modConfig;
|
|
41
|
+
}]);
|
|
42
|
+
return config;
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=withXCode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["withBuildProperties","withDangerousMod","fs","path","withXCode","config","ios","deploymentTarget","modConfig","podfilePath","join","modRequest","platformProjectRoot","contents","readFileSync","deploymentTargetSettingExists","test","replace","writeFileSync"],"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,SAASA,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,OAAOC,EAAE,MAAM,IAAI;AACnB,OAAOC,IAAI,MAAM,MAAM;;AAEvB;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,SAAoC,GAAGC,MAAM,IAAI;EAC5D;EACAA,MAAM,GAAGL,mBAAmB,CAACK,MAAM,EAAE;IAAEC,GAAG,EAAE;MAAEC,gBAAgB,EAAE;IAAO;EAAE,CAAC,CAAC;EAC3E;EACAF,MAAM,GAAGJ,gBAAgB,CAACI,MAAM,EAAE,CAChC,KAAK,EACLG,SAAS,IAAI;IACX,MAAMC,WAAW,GAAGN,IAAI,CAACO,IAAI,CAC3BF,SAAS,CAACG,UAAU,CAACC,mBAAmB,EACxC,SACF,CAAC;IACD,IAAIC,QAAQ,GAAGX,EAAE,CAACY,YAAY,CAACL,WAAW,EAAE,OAAO,CAAC;;IAEpD;IACA;IACA,MAAMM,6BAA6B,GACjC,qEAAqE,CAACC,IAAI,CACxEH,QACF,CAAC;IAEH,IAAI,CAACE,6BAA6B,EAAE;MAClC;MACAF,QAAQ,GAAGA,QAAQ,CAACI,OAAO,CACzB,gEAAgE,EAChE;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACQ,CAAC;IACH;IAEAf,EAAE,CAACgB,aAAa,CAACT,WAAW,EAAEI,QAAQ,CAAC;IACvC,OAAOL,SAAS;EAClB,CAAC,CACF,CAAC;EACF,OAAOH,MAAM;AACf,CAAC","ignoreList":[]}
|