diff --git a/box/box_test.go b/box/box_test.go index d25820b..a076382 100644 --- a/box/box_test.go +++ b/box/box_test.go @@ -42,4 +42,12 @@ func (s *S) TestRoundtrip(c *C) { plaintext, err := dec.Decrypt(ciphertext) c.Assert(err, IsNil) c.Assert(plaintext, DeepEquals, plain) + + plain[0] = 'Y' + ciphertext, err = enc.Encrypt(nil, nil, plain, 0) + c.Assert(err, IsNil) + + plaintext, err = dec.Decrypt(ciphertext) + c.Assert(err, IsNil) + c.Assert(plaintext, DeepEquals, plain) }