mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
* DataObject.cs: New. Complete implementation. * DSAKeyValue.cs: New. Complete implementation. * KeyInfo.cs: New. Complete implementation. * KeyInfoClause.cs: New. Abstract class (complete). * KeyInfoName.cs: New. Complete implementation. * KeyInfoNode.cs: New. Complete implementation. * KeyInfoRetrievalMethod.cs: New. Complete implementation. * KeyInfoX509Data.cs: New. Complete implementation. * Reference.cs: New. Incomplete implementation. * RSAKeyValue.cs: New. Complete implementation. * Signature.cs: New. Almost complete implementation - returned XML isn't exactly like the MS implementation. * SignedInfo.cs: New. Complete except SignatureLength. * SignedXml.cs: New. Minimal implementation (only enveloped signatures). Still many TODO! * Transform.cs: New. Abstract class (complete). * TransformChain.cs: New. Complete implementation. * XmlDsigBase64Transform.cs: New. Stub + basic logic. * XmlDsigC14NTransform.cs: New. Stub + basic logic. * XmlDsigC14NWithCommentsTransform.cs: New. Stub + basic logic. * XmlDsigEnvelopedSignatureTransform.cs: New. Stub + basic logic. * XmlDsigXPathTransform.cs: New. Stub + basic logic. * XmlDsigXsltTransform.cs: New. Stub + basic logic. svn path=/trunk/mcs/; revision=9124
60 lines
1.1 KiB
C#
60 lines
1.1 KiB
C#
//
|
|
// Transform.cs - Transform implementation for XML Signature
|
|
//
|
|
// Author:
|
|
// Sebastien Pouliot ([email protected])
|
|
//
|
|
// (C) 2002 Motus Technologies Inc. (http://www.motus.com)
|
|
//
|
|
|
|
using System.Text;
|
|
using System.Xml;
|
|
|
|
namespace System.Security.Cryptography.Xml {
|
|
|
|
public abstract class Transform {
|
|
|
|
protected string algo;
|
|
protected Type[] input;
|
|
protected Type[] output;
|
|
|
|
public Transform () {}
|
|
|
|
public string Algorithm {
|
|
get { return algo; }
|
|
set { algo = value; }
|
|
}
|
|
|
|
public abstract Type[] InputTypes {
|
|
get;
|
|
}
|
|
|
|
public abstract Type[] OutputTypes {
|
|
get;
|
|
}
|
|
|
|
protected abstract XmlNodeList GetInnerXml ();
|
|
|
|
public abstract object GetOutput ();
|
|
|
|
public abstract object GetOutput (Type type);
|
|
|
|
public XmlElement GetXml ()
|
|
{
|
|
StringBuilder sb = new StringBuilder ();
|
|
sb.Append ("<Transform Algorithm=\"");
|
|
sb.Append (algo);
|
|
sb.Append ("\"/>");
|
|
|
|
XmlDocument doc = new XmlDocument ();
|
|
doc.LoadXml (sb.ToString ());
|
|
return doc.DocumentElement;
|
|
}
|
|
|
|
public abstract void LoadInnerXml (XmlNodeList nodeList);
|
|
|
|
public abstract void LoadInput (object obj);
|
|
}
|
|
|
|
}
|