Added CipherCodec for pipeline encryption.#824
Conversation
|
@macer1 sorry but I have quite some back-log.. Will try review tomorrow |
|
Memory usage improvement is significant with resetting buffer to 0 👍 |
|
But shrinking the entire buffer every encode D: |
|
but less memory usage D: |
There was a problem hiding this comment.
Instead of doing this, you can just keep heapOut as a local variable and allocate it every time and free it:
ByteBuf heapOut = ctx.alloc().heapBuffer(cap);
try {
process(...);
...
} finally {
heapOut.free();
}
There was a problem hiding this comment.
You could use cipher.getOutputSize(readable) to determine the best capacity at the beginning for even more savings.
|
Also, could you please sign the CLA if you didn't yet? :-) https://docs.google.com/spreadsheet/viewform?formkey=dHBjc1YzdWhsZERUQnhlSklsbG1KT1E6MQ#gid=0 |
|
also, how about making this.encrypt/decrypt protected so user can do like public class AESCipherCodec extends CipherCodec {
public AESCipherCodec(Key encryptionKey) throws Exception {
IvParameterSpec ivSpec = new IvParameterSpec(encryptionKey.getEncoded());
this.encrypt = getAESCipher(true, encryptionKey, ivSpec);
this.decrypt = getAESCipher(false, encryptionKey, ivSpec);
} |
|
please tell me when you think it is all done, I will squash the commits |
|
You can't license it under that and expect it to get pulled. |
|
whatever, signed that CLA instead |
Motivation: The used version of BoringSSL is ASL2 Modifications: Update and so fix license informations for BoringSSL Result: Include correct license for BoringSSL
What do you think about that?