/// <summary> /// Initializes the signer to output signed bytes and a string based on the requested options. /// </summary> /// <param name="privateKey"></param> /// <param name="output"></param> public Signer(RSACryptoServiceProvider privateKey, EncodingOption output) { if (privateKey == null) { throw new ArgumentException("privateKey"); } _privateKey = privateKey; _encoding = output; }
/// <summary> /// Initializes the signer to output signed bytes and a Base64 string. /// </summary> /// <param name="privateKey"></param> public Signer(RSACryptoServiceProvider privateKey) { if (privateKey == null) { throw new ArgumentException("privateKey"); } _privateKey = privateKey; // hex strings are shorter and the verifier will accept either _encoding = EncodingOption.Base64String; }