Add functions for encoding keys
Move key to a separate package