o Add option to choose cipher and digest algorithms when signing and encrypting. Closes #4030.