added encrypt functions