LevelDB 源码分析「三、高性能写操作」 | SF-Zhou's Blog #173
Replies: 6 comments 2 replies
-
Thank you for the great article. I'm adding trying to use encrypt/decrypt for leveldb and my idea is encrypt data before write to file in env_posix.cc , method WriteUnbuffered(const char *data, size_t size) . But I don't know if encrypt " char *data " has any effect to Record Header , CRC32... . I greatly appreciate your comments on this matter. |
Beta Was this translation helpful? Give feedback.
-
I think it's ok if you do symmetrical decryption after |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer, I'm doing with AES. I created a dex array from *data but only the first 5 bytes can be encrypted, the key and value cannot be encrypted. I'm using this library https://github.com/kokke/tiny-AES-c and it's working perfect with normal string. Do you have any idea about the type of "char *data"? |
Beta Was this translation helpful? Give feedback.
-
The |
Beta Was this translation helpful? Give feedback.
-
Really thank you for your help, now I have a keywork to continue my work. Have a nice day bro. |
Beta Was this translation helpful? Give feedback.
-
看了一下代码,写入的时候好像是按照Record粒度来写入文件的,不是按照Block粒度来写入文件的,对吗? |
Beta Was this translation helpful? Give feedback.
-
https://sf-zhou.github.io/leveldb/leveldb_03_write_batch_and_log.html
Beta Was this translation helpful? Give feedback.
All reactions