Code itself looks good. Quick question: would it make sense to maintain a
backwards-compatible constructor? I.e.
```
public BaseCipherPayload(Payload delegate, Key key) {
this(null, delegate, key); // pity there seems to be no way to get the
"default crypto object"!
}
public BaseCipherPayload(Crypto crypto, Payload delegate, Key key) {
super(delegate);
this.crypto = crypto;
this.key = checkNotNull(key, "key");
}
...
try {
if (crypto != null) {
cipher = crypto.cipher("RSA");
} else {
cipher = Cipher.getInstance("RSA");
}
cipher.init(Cipher.DECRYPT_MODE, key);
...
```
?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/428#issuecomment-47671870