Tests for encryption