react-native-quick-crypto 1.0.0-beta.12 → 1.0.0-beta.14
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/README.md +1 -1
- package/android/CMakeLists.txt +8 -2
- package/android/src/main/java/com/margelo/nitro/quickcrypto/QuickCryptoPackage.java +0 -2
- package/cpp/cipher/CCMCipher.cpp +199 -0
- package/cpp/cipher/CCMCipher.hpp +26 -0
- package/cpp/cipher/HybridCipher.cpp +324 -0
- package/cpp/cipher/HybridCipher.hpp +69 -0
- package/cpp/cipher/HybridCipherFactory.hpp +59 -0
- package/cpp/cipher/OCBCipher.cpp +55 -0
- package/cpp/cipher/OCBCipher.hpp +19 -0
- package/cpp/ed25519/HybridEdKeyPair.cpp +34 -91
- package/cpp/ed25519/HybridEdKeyPair.hpp +24 -54
- package/cpp/hash/HybridHash.cpp +30 -60
- package/cpp/hash/HybridHash.hpp +11 -27
- package/cpp/hmac/HybridHmac.cpp +95 -0
- package/cpp/hmac/HybridHmac.hpp +31 -0
- package/cpp/pbkdf2/HybridPbkdf2.cpp +34 -55
- package/cpp/pbkdf2/HybridPbkdf2.hpp +5 -16
- package/cpp/random/HybridRandom.cpp +5 -16
- package/cpp/random/HybridRandom.hpp +5 -6
- package/cpp/utils/Utils.hpp +1 -2
- package/lib/commonjs/cipher.js +157 -0
- package/lib/commonjs/cipher.js.map +1 -0
- package/lib/commonjs/hash.js +41 -18
- package/lib/commonjs/hash.js.map +1 -1
- package/lib/commonjs/hmac.js +109 -0
- package/lib/commonjs/hmac.js.map +1 -0
- package/lib/commonjs/index.js +31 -25
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/pbkdf2.js.map +1 -1
- package/lib/commonjs/specs/cipher.nitro.js +6 -0
- package/lib/commonjs/specs/cipher.nitro.js.map +1 -0
- package/lib/commonjs/specs/hmac.nitro.js +6 -0
- package/lib/commonjs/specs/hmac.nitro.js.map +1 -0
- package/lib/commonjs/utils/cipher.js +64 -0
- package/lib/commonjs/utils/cipher.js.map +1 -0
- package/lib/commonjs/utils/types.js +3 -1
- package/lib/commonjs/utils/types.js.map +1 -1
- package/lib/module/cipher.js +150 -0
- package/lib/module/cipher.js.map +1 -0
- package/lib/module/hash.js +41 -18
- package/lib/module/hash.js.map +1 -1
- package/lib/module/hmac.js +104 -0
- package/lib/module/hmac.js.map +1 -0
- package/lib/module/index.js +9 -23
- package/lib/module/index.js.map +1 -1
- package/lib/module/pbkdf2.js.map +1 -1
- package/lib/module/specs/cipher.nitro.js +4 -0
- package/lib/module/specs/cipher.nitro.js.map +1 -0
- package/lib/module/specs/hmac.nitro.js +4 -0
- package/lib/module/specs/hmac.nitro.js.map +1 -0
- package/lib/module/utils/cipher.js +56 -0
- package/lib/module/utils/cipher.js.map +1 -0
- package/lib/module/utils/types.js +4 -0
- package/lib/module/utils/types.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/typescript/cipher.d.ts +52 -0
- package/lib/typescript/cipher.d.ts.map +1 -0
- package/lib/typescript/hash.d.ts +23 -1
- package/lib/typescript/hash.d.ts.map +1 -1
- package/lib/typescript/hmac.d.ts +66 -0
- package/lib/typescript/hmac.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +17 -12
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/keys/utils.d.ts.map +1 -1
- package/lib/typescript/pbkdf2.d.ts +1 -1
- package/lib/typescript/pbkdf2.d.ts.map +1 -1
- package/lib/typescript/specs/cipher.nitro.d.ts +29 -0
- package/lib/typescript/specs/cipher.nitro.d.ts.map +1 -0
- package/lib/typescript/specs/hmac.nitro.d.ts +10 -0
- package/lib/typescript/specs/hmac.nitro.d.ts.map +1 -0
- package/lib/typescript/utils/cipher.d.ts +7 -0
- package/lib/typescript/utils/cipher.d.ts.map +1 -0
- package/lib/typescript/utils/conversion.d.ts.map +1 -1
- package/lib/typescript/utils/types.d.ts +6 -1
- package/lib/typescript/utils/types.d.ts.map +1 -1
- package/nitrogen/generated/.gitattributes +1 -0
- package/nitrogen/generated/android/QuickCrypto+autolinking.cmake +19 -0
- package/nitrogen/generated/android/QuickCryptoOnLoad.cpp +35 -5
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/crypto/QuickCryptoOnLoad.kt +35 -0
- package/nitrogen/generated/ios/QuickCrypto+autolinking.rb +2 -0
- package/nitrogen/generated/ios/QuickCrypto-Swift-Cxx-Umbrella.hpp +0 -1
- package/nitrogen/generated/ios/QuickCryptoAutolinking.mm +35 -5
- package/nitrogen/generated/shared/c++/CFRGKeyPairType.hpp +1 -1
- package/nitrogen/generated/shared/c++/CipherArgs.hpp +88 -0
- package/nitrogen/generated/shared/c++/HybridCipherFactorySpec.cpp +21 -0
- package/nitrogen/generated/shared/c++/HybridCipherFactorySpec.hpp +67 -0
- package/nitrogen/generated/shared/c++/HybridCipherSpec.cpp +28 -0
- package/nitrogen/generated/shared/c++/HybridCipherSpec.hpp +76 -0
- package/nitrogen/generated/shared/c++/HybridEdKeyPairSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridHashSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridHmacSpec.cpp +23 -0
- package/nitrogen/generated/shared/c++/HybridHmacSpec.hpp +66 -0
- package/nitrogen/generated/shared/c++/HybridKeyObjectHandleSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridPbkdf2Spec.hpp +1 -1
- package/nitrogen/generated/shared/c++/HybridRandomSpec.hpp +1 -1
- package/nitrogen/generated/shared/c++/JWK.hpp +2 -1
- package/nitrogen/generated/shared/c++/JWKkty.hpp +1 -1
- package/nitrogen/generated/shared/c++/JWKuse.hpp +1 -1
- package/nitrogen/generated/shared/c++/KFormatType.hpp +1 -1
- package/nitrogen/generated/shared/c++/KeyDetail.hpp +2 -1
- package/nitrogen/generated/shared/c++/KeyEncoding.hpp +1 -1
- package/nitrogen/generated/shared/c++/KeyType.hpp +1 -1
- package/nitrogen/generated/shared/c++/KeyUsage.hpp +1 -1
- package/nitrogen/generated/shared/c++/NamedCurve.hpp +1 -1
- package/package.json +3 -13
- package/src/cipher.ts +303 -0
- package/src/hash.ts +51 -15
- package/src/hmac.ts +135 -0
- package/src/index.ts +9 -23
- package/src/pbkdf2.ts +1 -1
- package/src/specs/cipher.nitro.ts +25 -0
- package/src/specs/hmac.nitro.ts +7 -0
- package/src/utils/cipher.ts +60 -0
- package/src/utils/types.ts +27 -0
package/src/utils/types.ts
CHANGED
|
@@ -282,3 +282,30 @@ export type Encoding =
|
|
|
282
282
|
| CharacterEncoding
|
|
283
283
|
| LegacyCharacterEncoding
|
|
284
284
|
| 'buffer';
|
|
285
|
+
|
|
286
|
+
// These are for shortcomings in @types/node
|
|
287
|
+
// Here we use "*Type" instead of "*Types" like node does.
|
|
288
|
+
// export type CipherCBCType = 'aes-128-cbc' | 'aes-192-cbc' | 'aes-256-cbc';
|
|
289
|
+
export type CipherCFBType =
|
|
290
|
+
| 'aes-128-cfb'
|
|
291
|
+
| 'aes-192-cfb'
|
|
292
|
+
| 'aes-256-cfb'
|
|
293
|
+
| 'aes-128-cfb1'
|
|
294
|
+
| 'aes-192-cfb1'
|
|
295
|
+
| 'aes-256-cfb1'
|
|
296
|
+
| 'aes-128-cfb8'
|
|
297
|
+
| 'aes-192-cfb8'
|
|
298
|
+
| 'aes-256-cfb8';
|
|
299
|
+
export type CipherCTRType = 'aes-128-ctr' | 'aes-192-ctr' | 'aes-256-ctr';
|
|
300
|
+
export type CipherDESType =
|
|
301
|
+
| 'des'
|
|
302
|
+
| 'des3'
|
|
303
|
+
| 'des-cbc'
|
|
304
|
+
| 'des-ecb'
|
|
305
|
+
| 'des-ede'
|
|
306
|
+
| 'des-ede-cbc'
|
|
307
|
+
| 'des-ede3'
|
|
308
|
+
| 'des-ede3-cbc';
|
|
309
|
+
export type CipherECBType = 'aes-128-ecb' | 'aes-192-ecb' | 'aes-256-ecb';
|
|
310
|
+
export type CipherGCMType = 'aes-128-gcm' | 'aes-192-gcm' | 'aes-256-gcm';
|
|
311
|
+
export type CipherOFBType = 'aes-128-ofb' | 'aes-192-ofb' | 'aes-256-ofb';
|