Guard against enabling encryption by adding a key. Added tests.