add encryption method for string category and added tests