add generate method
add encrypt and get methods