Commit cc22312
committed
refactor: use task_id to derive key instead of constructing nonce
- Now the pieces of one task use the same key and nonce
- Key is derived from (the primary key, task_id), so every task uses different key
- EncryptReader will seek corresponding offset to encrypt piece plaintext
- When export encrypted files, we can decrypt whole file stream instead of decrypting every single piece
Signed-off-by: chohee <cc5281@126.com>1 parent 5d196fb commit cc22312
File tree
10 files changed
+241
-300
lines changed- dragonfly-client-storage
- src
- encrypt
- algorithm
- cryptor
- dragonfly-client/src
- grpc
- resource
10 files changed
+241
-300
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | 37 | | |
39 | 38 | | |
40 | | - | |
41 | 39 | | |
42 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| |||
0 commit comments