Implemented encrypted key write methods. Relates to #17.
Encrypted key reading/writing. Closes #17.