added encrypt and sign