Encrypt functions take necessary vars as parameters