added some unit test on encrypted_only and no keys