Adding encryption functionality