Skip to content

Added CipherCodec for pipeline encryption.#824

Closed
ghost wants to merge 3 commits intomasterfrom
unknown repository
Closed

Added CipherCodec for pipeline encryption.#824
ghost wants to merge 3 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Dec 16, 2012

What do you think about that?

@normanmaurer
Copy link
Copy Markdown
Member

@macer1 sorry but I have quite some back-log.. Will try review tomorrow

@ghost
Copy link
Copy Markdown
Author

ghost commented Dec 17, 2012

Memory usage improvement is significant with resetting buffer to 0 👍

@md-5
Copy link
Copy Markdown
Contributor

md-5 commented Dec 19, 2012

But shrinking the entire buffer every encode D:

@ghost
Copy link
Copy Markdown
Author

ghost commented Dec 19, 2012

but less memory usage D:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could use cipher.getOutputSize(readable) to determine the best capacity at the beginning for even more savings.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea
done

@trustin
Copy link
Copy Markdown
Member

trustin commented Dec 19, 2012

Also, could you please sign the CLA if you didn't yet? :-)

https://docs.google.com/spreadsheet/viewform?formkey=dHBjc1YzdWhsZERUQnhlSklsbG1KT1E6MQ#gid=0

@ghost
Copy link
Copy Markdown
Author

ghost commented Dec 19, 2012

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);
    }

@ghost
Copy link
Copy Markdown
Author

ghost commented Dec 19, 2012

please tell me when you think it is all done, I will squash the commits

@md-5
Copy link
Copy Markdown
Contributor

md-5 commented Dec 19, 2012

You can't license it under that and expect it to get pulled.

@ghost
Copy link
Copy Markdown
Author

ghost commented Dec 19, 2012

whatever, signed that CLA instead

@ghost ghost closed this Dec 24, 2012
normanmaurer added a commit that referenced this pull request Sep 15, 2025
Motivation:

The used version of BoringSSL is ASL2

Modifications:

Update and so fix license informations for BoringSSL

Result:

Include correct license for BoringSSL
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants