XmlLicenseTransformとは? わかりやすく解説

XmlLicenseTransform クラス

メモ : このクラスは、.NET Framework version 2.0新しく追加されたものです。

XrML ライセンス署名用に正規化するためのライセンス変換アルゴリズム表します

名前空間: System.Security.Cryptography.Xml
アセンブリ: System.Security (system.security.dll 内)
構文構文

Public Class XmlLicenseTransform
    Inherits Transform
Dim instance As XmlLicenseTransform
public class XmlLicenseTransform : Transform
public ref class XmlLicenseTransform : public
 Transform
public class XmlLicenseTransform extends Transform
public class XmlLicenseTransform extends
 Transform
解説解説

XmlLicenseTransform クラスは、MPEG REL (MPEG Rights Extension Language) で定義されているライセンス変換アルゴリズム表します

XrML を署名用に変換するには、XmlLicenseTransform クラス使用します

XmlLicenseTransform クラス識別する URI (Uniform Resource Identifier) は、XmlLicenseTransformUrl フィールドによって定義されます。

使用例使用例

次のコード例は、IRelDecryptor インターフェイスXmlLicenseTransform クラス使用して XML デジタル署名検証する方法示してます。

public static void CheckSignatureWithEncryptedGrant(string
 fileName, IRelDecryptor decryptor)
{
    // Create a new XML document.
    XmlDocument xmlDocument = new XmlDocument();
    XmlNamespaceManager nsManager = new XmlNamespaceManager(xmlDocument.NameTable);

    // Format using whitespaces.
    xmlDocument.PreserveWhitespace = true;

    // Load the passed XML file into the document. 
    xmlDocument.Load(fileName);
    nsManager.AddNamespace("dsig", SignedXml.XmlDsigNamespaceUrl);

    // Find the "Signature" node and create a new XmlNodeList
 object.
    XmlNodeList nodeList = xmlDocument.SelectNodes("//dsig:Signature",
 nsManager);

    for (int i = 0, count = nodeList.Count;
 i < count; i++)
    {
        XmlDocument clone = xmlDocument.Clone() as XmlDocument;
        XmlNodeList signatures = clone.SelectNodes("//dsig:Signature",
 nsManager);

        // Create a new SignedXml object and pass into it the XML document
 clone.
        SignedXml signedXml = new SignedXml(clone);

        // Load the signature node.
        signedXml.LoadXml((XmlElement)signatures[i]);

        // Set the context for license transform
        Transform trans = ((Reference)signedXml.SignedInfo.References[0]).TransformChain[0];

        if (trans is XmlLicenseTransform)
        {

            // Decryptor is used to decrypt encryptedGrant elements.
            if (decryptor != null)
                (trans as XmlLicenseTransform).Decryptor = decryptor;
        }

        // Check the signature and display the result.
        bool result = signedXml.CheckSignature();

        if (result)
            Console.WriteLine("SUCCESS: CheckSignatureWithEncryptedGrant - issuer
 index #" +
                                            i.ToString());
        else
            Console.WriteLine("FAILURE: CheckSignatureWithEncryptedGrant - issuer
 index #" +
                                            i.ToString());
    }

}
void CheckSignatureWithEncryptedGrant(
    String^ fileName, IRelDecryptor^ decryptor)
{
    // Create a new XML document.
    XmlDocument^ sourceDocument = gcnew XmlDocument();
    XmlNamespaceManager^ namespaceManager =
        gcnew XmlNamespaceManager(sourceDocument->NameTable);

    // Format using whitespaces.
    sourceDocument->PreserveWhitespace = true;

    // Load the passed XML file into the document.
    sourceDocument->Load(fileName);
    namespaceManager->AddNamespace("dsig",
        SignedXml::XmlDsigNamespaceUrl);

    // Find the "Signature" node and create a new
    // XmlNodeList object.
    XmlNodeList^ nodeList = 
        sourceDocument->SelectNodes("//dsig:Signature",
 namespaceManager);

    for (int i = 0, count = nodeList->Count;
 i < count; i++)
    {
        XmlDocument^ clone = (XmlDocument^) sourceDocument->Clone();
        XmlNodeList^ signatures =
            clone->SelectNodes("//dsig:Signature", namespaceManager);

        // Create a new SignedXml object and pass into it the
        // XML document clone.
        SignedXml^ signedDocument = gcnew SignedXml(clone);

        // Load the signature node.
        signedDocument->LoadXml((XmlElement^)signatures[i]);

        // Set the context for license transform
        Transform^ licenseTransform = ((Reference^)signedDocument->
            SignedInfo->References[0])->TransformChain[0];

        if ((licenseTransform::typeid == XmlLicenseTransform::typeid)
 
            && (decryptor != nullptr))
        {
            // Decryptor is used to decrypt encryptedGrant
            // elements.
            ((XmlLicenseTransform^) licenseTransform)->Decryptor = decryptor;
        }

        // Check the signature and display the result.
        if (signedDocument->CheckSignature())
        {
            Console::WriteLine("SUCCESS: " +
                "CheckSignatureWithEncryptedGrant - issuer index #" + i);
        }
        else
        {
            Console::WriteLine("FAILURE: " +
                "CheckSignatureWithEncryptedGrant - issuer index #" + i);
        }
    }
}
継承階層継承階層
System.Object
   System.Security.Cryptography.Xml.Transform
    System.Security.Cryptography.Xml.XmlLicenseTransform
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
XmlLicenseTransform メンバ
System.Security.Cryptography.Xml 名前空間

XmlLicenseTransform コンストラクタ


XmlLicenseTransform プロパティ


XmlLicenseTransform メソッド


パブリック メソッドパブリック メソッド

( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 ( Object から継承されます。)
パブリック メソッド GetDigestedOutput  派生クラスオーバーライドされた場合は、Transform オブジェクト関連付けられているダイジェスト返します。 ( Transform から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 ( Object から継承されます。)
パブリック メソッド GetOutput オーバーロードされますオーバーライドされます。 XmlLicenseTransform オブジェクト出力返します
パブリック メソッド GetType  現在のインスタンスType取得します。 ( Object から継承されます。)
パブリック メソッド GetXml  現在の Transform オブジェクトXML 表現返します。 ( Transform から継承されます。)
パブリック メソッド LoadInnerXml オーバーライドされます指定した XmlNodeList オブジェクト<Transform> 要素変換固有内容として解析しますXmlLicenseTransform オブジェクト内部 XML 要素持たないため、このメソッドサポートされません。
パブリック メソッド LoadInput オーバーライドされます指定した入力現在の XmlLicenseTransform オブジェクト読み込みます。
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 ( Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 ( Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

XmlLicenseTransform クラス
System.Security.Cryptography.Xml 名前空間

XmlLicenseTransform メンバ

XrML ライセンス署名用に正規化するためのライセンス変換アルゴリズム表します

XmlLicenseTransform データ型公開されるメンバを以下の表に示します


パブリック コンストラクタパブリック コンストラクタ
  名前 説明
パブリック メソッド XmlLicenseTransform XmlLicenseTransform クラス新しインスタンス初期化します。
パブリック プロパティパブリック プロパティ
パブリック メソッドパブリック メソッド
( プロテクト メソッド参照)
  名前 説明
パブリック メソッド Equals  オーバーロードされます2 つObject インスタンス等しかどうか判断します。 (Object から継承されます。)
パブリック メソッド GetDigestedOutput  派生クラスオーバーライドされた場合は、Transform オブジェクト関連付けられているダイジェスト返します。 (Transform から継承されます。)
パブリック メソッド GetHashCode  特定の型のハッシュ関数として機能します。GetHashCode は、ハッシュ アルゴリズムや、ハッシュ テーブルのようなデータ構造での使用適してます。 (Object から継承されます。)
パブリック メソッド GetOutput オーバーロードされますオーバーライドされますXmlLicenseTransform オブジェクト出力返します
パブリック メソッド GetType  現在のインスタンスType取得します。 (Object から継承されます。)
パブリック メソッド GetXml  現在の Transform オブジェクトXML 表現返します。 (Transform から継承されます。)
パブリック メソッド LoadInnerXml オーバーライドされます指定した XmlNodeList オブジェクト<Transform> 要素変換固有内容として解析しますXmlLicenseTransform オブジェクト内部 XML 要素持たないため、このメソッドサポートされません。
パブリック メソッド LoadInput オーバーライドされます指定した入力現在の XmlLicenseTransform オブジェクト読み込みます。
パブリック メソッド ReferenceEquals  指定した複数Object インスタンス同一かどうか判断します。 (Object から継承されます。)
パブリック メソッド ToString  現在の Object を表す String返します。 (Object から継承されます。)
プロテクト メソッドプロテクト メソッド
参照参照

関連項目

XmlLicenseTransform クラス
System.Security.Cryptography.Xml 名前空間



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「XmlLicenseTransform」の関連用語

XmlLicenseTransformのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



XmlLicenseTransformのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS