Serializing to a CipherOutputStream gets corrupted data