@onekeyfe/react-native-aes-crypto 3.0.179 → 6.7.0-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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +16 -2
  3. package/package.json +1 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2018 tectiv3
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -35,13 +35,27 @@ Use the exact signatures in [src/NativeAesCrypto.ts](src/NativeAesCrypto.ts) and
35
35
  the GCM contract comments in [src/index.tsx](src/index.tsx). Applications own
36
36
  key storage, nonce uniqueness, input encoding and handling promise failures.
37
37
 
38
+ ## Authenticated-encryption interoperability
39
+
40
+ `aesGcmEncrypt(data, key, nonce, aad)` and
41
+ `aesGcmDecrypt(ciphertextWithTag, key, nonce, aad)` operate on hex strings.
42
+ An empty plaintext is allowed and produces only the 16-byte tag. The ciphertext
43
+ passed to decryption must contain at least that tag. Use the identical key,
44
+ nonce and associated-data bytes when decrypting; mismatches reject.
45
+
46
+ The bridge accepts 16-, 24- or 32-byte AES keys and exactly 12 nonce bytes.
47
+ It rejects empty associated data and malformed hex. Keep these GCM parameters
48
+ separate from `encrypt(data, key, iv, algorithm)` and
49
+ `decrypt(base64, key, iv, algorithm)`, whose signatures and formats differ.
50
+ The exported `AesCryptoSpec` type describes the raw native surface.
51
+
38
52
  ## Upstream attribution
39
53
 
40
54
  First, a sincere thank-you to tectiv3 and the
41
55
  `react-native-aes-crypto` maintainers for their excellent work 🙏
42
56
 
43
57
  This package is built on, and inspired by,
44
- [tectiv3/react-native-aes-crypto](https://github.com/tectiv3/react-native-aes-crypto).
58
+ [tectiv3/react-native-aes](https://github.com/tectiv3/react-native-aes).
45
59
 
46
60
  Our original plan was to keep our customizations as patches on top of upstream
47
61
  `react-native-aes-crypto`.
@@ -55,7 +69,7 @@ development and delivery stable.
55
69
 
56
70
  ## Upstream Project
57
71
 
58
- - Repository: [tectiv3/react-native-aes-crypto](https://github.com/tectiv3/react-native-aes-crypto)
72
+ - Repository: [tectiv3/react-native-aes](https://github.com/tectiv3/react-native-aes)
59
73
  - License: MIT
60
74
 
61
75
  ## Notes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/react-native-aes-crypto",
3
- "version": "3.0.179",
3
+ "version": "6.7.0-1",
4
4
  "description": "react-native-aes-crypto",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",