Unit tests for segmented encrypter and decrypter.

This commit is contained in:
akwizgran
2012-01-13 13:06:43 +00:00
parent 90e54d94e6
commit d0e402062a
8 changed files with 189 additions and 26 deletions

View File

@@ -56,7 +56,7 @@ class SegmentedConnectionDecrypter implements FrameSource {
throw new FormatException();
// Decrypt the frame
try {
int decrypted = frameCipher.update(b, 0, length, b);
int decrypted = frameCipher.doFinal(b, 0, length, b);
assert decrypted == length;
} catch(GeneralSecurityException badCipher) {
throw new RuntimeException(badCipher);