using System; using System.Runtime.InteropServices; namespace System.Security.Cryptography { /// Contains information about the properties of a digital signature. // Token: 0x02000535 RID: 1333 [ComVisible(true)] public class SignatureDescription { /// Initializes a new instance of the class. // Token: 0x060030CE RID: 12494 RVA: 0x000A7E54 File Offset: 0x000A6054 public SignatureDescription() { } /// Initializes a new instance of the class from the specified . /// The from which to get the algorithms for the signature description. /// The parameter is null. // Token: 0x060030CF RID: 12495 RVA: 0x000A7E5C File Offset: 0x000A605C public SignatureDescription(SecurityElement el) { if (el == null) { throw new ArgumentNullException("el"); } SecurityElement securityElement = el.SearchForChildByTag("Deformatter"); this._DeformatterAlgorithm = ((securityElement != null) ? securityElement.Text : null); securityElement = el.SearchForChildByTag("Digest"); this._DigestAlgorithm = ((securityElement != null) ? securityElement.Text : null); securityElement = el.SearchForChildByTag("Formatter"); this._FormatterAlgorithm = ((securityElement != null) ? securityElement.Text : null); securityElement = el.SearchForChildByTag("Key"); this._KeyAlgorithm = ((securityElement != null) ? securityElement.Text : null); } /// Gets or sets the deformatter algorithm for the signature description. /// The deformatter algorithm for the signature description. // Token: 0x1700098B RID: 2443 // (get) Token: 0x060030D0 RID: 12496 RVA: 0x000A7F10 File Offset: 0x000A6110 // (set) Token: 0x060030D1 RID: 12497 RVA: 0x000A7F18 File Offset: 0x000A6118 public string DeformatterAlgorithm { get { return this._DeformatterAlgorithm; } set { this._DeformatterAlgorithm = value; } } /// Gets or sets the digest algorithm for the signature description. /// The digest algorithm for the signature description. // Token: 0x1700098C RID: 2444 // (get) Token: 0x060030D2 RID: 12498 RVA: 0x000A7F24 File Offset: 0x000A6124 // (set) Token: 0x060030D3 RID: 12499 RVA: 0x000A7F2C File Offset: 0x000A612C public string DigestAlgorithm { get { return this._DigestAlgorithm; } set { this._DigestAlgorithm = value; } } /// Gets or sets the formatter algorithm for the signature description. /// The formatter algorithm for the signature description. // Token: 0x1700098D RID: 2445 // (get) Token: 0x060030D4 RID: 12500 RVA: 0x000A7F38 File Offset: 0x000A6138 // (set) Token: 0x060030D5 RID: 12501 RVA: 0x000A7F40 File Offset: 0x000A6140 public string FormatterAlgorithm { get { return this._FormatterAlgorithm; } set { this._FormatterAlgorithm = value; } } /// Gets or sets the key algorithm for the signature description. /// The key algorithm for the signature description. // Token: 0x1700098E RID: 2446 // (get) Token: 0x060030D6 RID: 12502 RVA: 0x000A7F4C File Offset: 0x000A614C // (set) Token: 0x060030D7 RID: 12503 RVA: 0x000A7F54 File Offset: 0x000A6154 public string KeyAlgorithm { get { return this._KeyAlgorithm; } set { this._KeyAlgorithm = value; } } /// Creates an instance with the specified key using the property. /// The newly created instance. /// The key to use in the . // Token: 0x060030D8 RID: 12504 RVA: 0x000A7F60 File Offset: 0x000A6160 public virtual AsymmetricSignatureDeformatter CreateDeformatter(AsymmetricAlgorithm key) { if (this._DeformatterAlgorithm == null) { throw new ArgumentNullException("DeformatterAlgorithm"); } AsymmetricSignatureDeformatter asymmetricSignatureDeformatter = (AsymmetricSignatureDeformatter)CryptoConfig.CreateFromName(this._DeformatterAlgorithm); if (this._KeyAlgorithm == null) { throw new NullReferenceException("KeyAlgorithm"); } asymmetricSignatureDeformatter.SetKey(key); return asymmetricSignatureDeformatter; } /// Creates a instance using the property. /// The newly created instance. /// /// /// // Token: 0x060030D9 RID: 12505 RVA: 0x000A7FB4 File Offset: 0x000A61B4 public virtual HashAlgorithm CreateDigest() { if (this._DigestAlgorithm == null) { throw new ArgumentNullException("DigestAlgorithm"); } return (HashAlgorithm)CryptoConfig.CreateFromName(this._DigestAlgorithm); } /// Creates an instance with the specified key using the property. /// The newly created instance. /// The key to use in the . // Token: 0x060030DA RID: 12506 RVA: 0x000A7FE8 File Offset: 0x000A61E8 public virtual AsymmetricSignatureFormatter CreateFormatter(AsymmetricAlgorithm key) { if (this._FormatterAlgorithm == null) { throw new ArgumentNullException("FormatterAlgorithm"); } AsymmetricSignatureFormatter asymmetricSignatureFormatter = (AsymmetricSignatureFormatter)CryptoConfig.CreateFromName(this._FormatterAlgorithm); if (this._KeyAlgorithm == null) { throw new NullReferenceException("KeyAlgorithm"); } asymmetricSignatureFormatter.SetKey(key); return asymmetricSignatureFormatter; } // Token: 0x040013F5 RID: 5109 private string _DeformatterAlgorithm; // Token: 0x040013F6 RID: 5110 private string _DigestAlgorithm; // Token: 0x040013F7 RID: 5111 private string _FormatterAlgorithm; // Token: 0x040013F8 RID: 5112 private string _KeyAlgorithm; } }