AES: Cleanups (ticket #1989)

This commit is contained in:
zzz
2017-05-10 14:00:59 +00:00
parent d139892ae0
commit efd7d651cc
3 changed files with 25 additions and 22 deletions

View File

@@ -37,15 +37,14 @@ public class SessionKey extends SimpleDataStructure {
}
/**
* caveat: this method isn't synchronized with the preparedKey, so don't
* try to *change* the key data after already doing some
* encryption/decryption (or if you do change it, be sure this object isn't
* mid decrypt)
* Sets the data.
* @param data 32 bytes, or null
* @throws IllegalArgumentException if data is not the legal number of bytes (but null is ok)
* @throws RuntimeException if data already set.
*/
@Override
public void setData(byte[] data) {
super.setData(data);
_preparedKey = null;
}
/**