public byte[] GetCertificateContent() { if (string.IsNullOrEmpty(CertificateContent)) { return(null); } return(JwsHelper.Base64UrlDecode(CertificateContent)); }
public void SaveCertificate(Stream s) { if (string.IsNullOrEmpty(CertificateContent)) { throw new InvalidOperationException("Certificate content is missing or empty"); } var raw = JwsHelper.Base64UrlDecode(CertificateContent); s.Write(raw, 0, raw.Length); }