/// <summary> /// Create new instances of SignerIdentityValue. /// See RELOAD base -13 p. 52 /// </summary> /// <param name="type">The Singner type: cert_hash</param> /// <param name="args">The arguments for this type, e.g., cert hash: args[0] = hash_alg, args[1]= certificate_hash</param> public SignerIdentityValue(SignerIdentityType type, HashAlgorithm alg, byte[] hash) { switch (type) { case SignerIdentityType.cert_hash: hashAlg = alg; certificateHash = (byte[])hash.Clone(); break; case SignerIdentityType.cert_hash_node_id: throw new NotSupportedException( "ReloadMsg: SignIDType cert_hash_node_id not implemented!"); /* This structure may be extended with new types if necessary*/ default: throw new NotImplementedException( String.Format("SigIdValue: Uknown SignerIdentityType: {0}", type)); } }
/// <summary> /// Creates a signer identity. /// </summary> public SignerIdentity(SignerIdentityType type, SignerIdentityValue value) { identityType = type; identity = value; length = (UInt16)(1 + value.CertificateHash.Length); }