converts encrypt and decrypt to be exported functions