🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.xml
Article #282

XML���ܺ�ǩ��(ת��)

#282
From: <Test/>
Date: Sun, 22 Nov 2009 15:31
147 lines
12391 bytes
���

XML �Ѿ���Ϊһ���м�ֵ���ƣ��������������Ͻ�����ݡ�SOAP�����ַ��� XML ��Ϣ�ķ�ʽ����ʹ�����һ��ǰ��δ�еķ�ʽ�໥ͨ�ţ��� UDDI ���������ڿ��ٳ�Ϊ��� Web ����Ĺ�Ӧ�̺��û��ı�׼���������� XML �� WSDL ������Web �����������ԡ�����ʽ�����ġ����û�� XML��������������������Ժ�������
��һ�����������������ǰ�ȫ�������ڹ����������ϣ��ڲ�ͬ����֮�佨�����εĴ�ͳ�����Ѳ����ʣ�Ŀǰ��һЩ�������Ͷ���ڼ����Щ����Ϳ�����׼�Ļ�С�������Ҫ����ؿ����� XML ���ܡ�

XML ����ʾ��

XML �����﷨�ĺ���Ԫ���� EncryptedData Ԫ�أ���Ԫ���� EncryptedKey Ԫ��һ��������������Կ�ӷ��𷽴��͵����շ���EncryptedData��������EncryptedType �������͵ġ�Ҫ���ܵ���ݿ�����������ݡ�XML �ĵ���XML Ԫ�ػ� XML Ԫ�����ݣ������ܵ������һ���������������ݵ� XML ����Ԫ�ء�������Ԫ�ػ�Ԫ������ʱ��EncryptedData Ԫ���滻 XML �ĵ����ܰ汾�еĸ�Ԫ�ػ����ݡ������ܶ������������ʱ��EncryptedData Ԫ�ؿ��ܳ�Ϊ���ܳ�Ϊһ���Ӵ�Ԫ�أ������� XML �ĵ��ĸ�������� XML �ĵ�ʱ��EncryptedData Ԫ�ؿ��ܳ�Ϊ���ĵ��ĸ���⣬EncryptedData ��������һ�� EncryptedData Ԫ�صĸ�����Ӵ�Ԫ�أ�����ʵ�ʼ��ܵ���ݿ����ǰ������� EncryptedData �� EncryptedKey Ԫ�ص��κ����ݡ�
�嵥 1 �еĴ���Ƭ����ʾ�˴������ÿ������������Ϣ��δ���� XML �ĵ�����ijЩ����£�����ϣ����ܳ�ͻ���������������Ϣ���嵥 2 �Ĵ���Ƭ����ʾ�������������
�嵥 1. ��ʾ li zhe �������ʻ���1��5000RMB�޶���ź���Ч�ڵĵ���Ϣ
     <?xml version='1.0'?>
       <PaymentInfo xmlns='http://example.org/paymentv2&#39;>
         <Name>Li Zhe<Name/>
         <CreditCard Limit='15,000' Currency='USD'>
           <Number>95599 8002 32718</Number>
           <Issuer>Bank of China</Issuer>
           <Expiration>06/02</Expiration>
         </CreditCard>
       </PaymentInfo>
�嵥 2. �����֮��ȫ�������ܵļ����ĵ�
     <?xml version='1.0'?>
       <PaymentInfo xmlns='http://example.org/paymentv2&#39;>
         <Name>Li Zhe<Name/>
         <EncryptedData Type='http://www.w3.org/2001/04/xmlenc#Element'
xmlns='http://www.w3.org/2001/04/xmlenc#'>
             <CipherData><Ciphervalue>A23B45C56</Ciphervalue></CipherData>
         </EncryptedData>
       </PaymentInfo>
���ǣ�����������£�����ֻ��Ҫ����һЩ�������ݣ� �嵥 3 ��ʾ����㡣
�嵥 3. ֻ���������ÿ��ŵļ����ĵ�
     <?xml version='1.0'?> 
       <PaymentInfo xmlns='http://example.org/paymentv2&#39;>
         <Name>Li Zhe<Name/>
<CreditCard Limit='15,000' Currency='USD'>
           <Number>
             <EncryptedData xmlns='http://www.w3.org/2001/04/xmlenc#'
              Type='http://www.w3.org/2001/04/xmlenc#Content'>
                 <CipherData><Ciphervalue>A23B45C56</Ciphervalue>
                 </CipherData>
             </EncryptedData>
           </Number>
           <Issuer>Bank China</Issuer>
           <Expiration>06/02</Expiration>
         </CreditCard>
       </PaymentInfo>
���ܻ��б�Ҫ�����ĵ��е�������Ϣ���嵥 4 ��ʾ����㡣
�嵥 4. ������ȫ�����ݵļ����ĵ�
<?xml version='1.0'?>
       <EncryptedData xmlns='http://www.w3.org/2001/04/xmlenc#'
        Type='http://www.isi.edu/in-notes/iana/assignments/media-types/text/xml&#39;>
                <CipherData><Ciphervalue>A23B45C56</Ciphervalue></CipherData>
       </EncryptedData>

XML ǩ��ʾ��

���Խ� XML ǩ��Ӧ�õ�����������ݡ���ЩӦ�õ���ͬ XML �ĵ�����ݵ�ǩ���Ϊ��װ�򱻷�װ��ǩ�����Щ�����ǩ��Ԫ���ⲿ��ǩ���Ϊ ����ǩ���嵥 5 ȡ��ǩ���ѡ�Ƽ��ĵ�������һ���򵥷���ǩ���ʵ��
�嵥 5. һ���򵥷���ǩ���ʾ��
        [s01] <Signature Id="MyFirstSignature"
                xmlns="http://www.w3.org/2000/09/xmldsig#"> 
          [s02]   <SignedInfo> 
          [s03]   <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/
                  REC-xml-c14n-20010315"/> 
          [s04]   <SignatureMethod Algorithm="http://www.w3.org/2000/09/
                  xmldsig#dsa-sha1"/> 
          [s05]   <Reference URI="http://www.w3.org/TR/2000/REC-xhtml1-20000126/"> 
          [s06]     <Transforms> 
          [s07]       <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-
                      20010315"/> 
          [s08]     </Transforms> 
          [s09]     <DigestMethod Algorithm="http://www.w3.org/2000/09/
                       xmldsig#sha1"/> 
          [s10]     <Digestvalue>j6lwx3rvEPO0vKtMup4NbeVu8nk=</Digestvalue> 
          [s11]   </Reference> 
          [s12] </SignedInfo> 
          [s13]   <Signaturevalue>MC0CFFrVLtRlk=...</Signaturevalue> 
          [s14]   <KeyInfo> 
          [s15a]    <Keyvalue>
          [s15b]      <DSAKeyvalue> 
          [s15c]        <p>...</p><Q>...</Q><G>...</G><Y>...</Y> 
          [s15d]      </DSAKeyvalue> 
          [s15e]    </Keyvalue> 
          [s16]   </KeyInfo> 
          [s17] </Signature>
ʵ��ǩ�����Ϣ��λ�� s02 �к� s12 ��֮�䣬�� SignedInfo Ԫ�ء���ǩ��IJ����а����ڼ��� Signaturevalue Ԫ�ص��㷨�����ã����Ǹ�Ԫ�ر���λ��ǩ���֮�⣨�� s13 ���ϣ���s04 ���ϵ� SignatureMethod ���õ��ǽ��淶�� SignedInfo ת���� Signaturevalue ���õ��㷨��KeyInfo Ԫ�أ�������λ�� s14 �к� s16 ��֮�䣩ָ��������֤ǩ�����Կ��
ת��
����ǰ�����ᵽ�ģ��û�������Ҫ���Ѿ����ּ��ܻ򲿷�ǩ��ı?�ֶ�����������ݡ�Ϊ������������W3C �����һ���й� XML ǩ��Ľ���ת�������ݰ���������IJο����ϡ���
�������ʾ��ժ���Ǹ��ĵ�������ʾ����ν����ĵ����շ�������ȷ�Ľ��ܺ�ǩ����֤˳�򡣵�һ���������ʾ��Ҫǩ����ĵ����� �� order Ԫ�أ����У��� 7 �е��� 11 �е� cardinfo Ԫ���ǹ��ڸ��˺Ͳ��������ϸ��Ϣ�����Ǵ��ı�����Ҳ����һЩ������ݣ��� 12 �У���
�嵥 6. XML �ĵ��е� order Ԫ��
        [01] <order Id="order">
          [02]   <item>
          [03]     <title>XML and Java</title>
          [04]     <price>100.0</price>
          [05]     <quantity>1</quantity>
          [06]   </item>
          [07]   <cardinfo>
          [08]     <name>Your Name</name>
          [09]     <expiration>04/2002</expiration>
          [10]     <number>5283 8304 6232 0010</number>
          [11]   </cardinfo>
          [12]   <EncryptedData Id="enc1"xmlns="http://www.w3.org/
                 2001/04/xmlenc#">...</EncryptedData>
          [13] </order>
�嵥 7. ����ǩ��ͽ�һ�����ܡ���������ʾת����Ϣ�� order �ĵ�
        [01] <Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
          [02]   <SignedInfo>
          [03]     ...
          [04]     <Reference URI="#order">
          [05]       <Transforms>
          [06]         <Transform Algorithm="http://www.w3.org/2001/04/
xmlenc#decryption">
          [07]           <DataReference URI="#enc1"
                          xmlns="http://www.w3.org/2001/04/xmlenc#"/>
          [08]         </Transform>
          [09]         <Transform Algorithm="http://www.w3.org/TR/2000/
                       CR-xml-c14n-20001026"/>
          [10]       </Transforms>
          [11]       ...
          [12]     </Reference>
          [13]   </SignedInfo>
          [14]   <Signaturevalue>...</Signaturevalue>
          [15]   <Object>
          [16]     <order Id="order">
          [17]       <item>
          [18]         <title>XML and Java</title>
          [19]         <price>100.0</price>
          [20]         <quantity>1</quantity>
          [21]       </item>
          [22]       <EncryptedData Id="enc2"
                     xmlns="http://www.w3.org/2001/04/xmlenc#">...</EncryptedData>
          [23]       <EncryptedData Id="enc1"
                     xmlns="http://www.w3.org/2001/04/xmlenc#">...</EncryptedData>
          [24]     </order>
          [25]   </Object>
          [26] </Signature>
�� 1 �е� �� 26 �е� Signature Ԫ�����ڰ�ǰ��� order Ԫ�أ�λ�ڵ� 16 �е��� 24 �У�������ǰ�ļ��ܴ��ı� cardinfo����ʾ�ڵ� 22 ����һ���У���������ת�����ã����ܣ��� 6 �е��� 8 �У��͹淶������ 9 �У�������ת��ָʾǩ����֤�����ܳ� DataRef Ԫ���е� 7 ��ָ�������֮������м�����ݡ������˵� 22 ���е� EncryptedData Ԫ��֮�󣬹淶�� order Ԫ�ز���ǡ������֤ǩ��
������ʹ�õı����ԡ��ɿ��Ժ�ǿ���Է��棬XML ��ȫ�Ի��кܶ�·Ҫ�ߡ�����Ŀǰ������ȡ�����õĽ�չ��

�ܽ�

XML,���ȷ��һ�ŷdz�ǿ��ļ���,������,��ֻ�Ǽ򵥵Ľ��������һ��㹦��.����ڼ��ܺ�����ǩ�����кܴ���ô�,���ںܶ��������кܴ���ô�.����,���ù���,ͼ�α�ʾ,��ݸ�ʽͳһ���ȵ�.�Ҿ�����Ӧ�ø���ѧϰ��,�����ҵĽ���������.�ҽ���������ѧϰ��,д���Ĺ������ºʹ�ҹ���.
---------------------------------------------------------
����ת�ԣ� http://www.supinfo-projects.com/cn/2006/xml_encryption_and_signature1/
--
Happy XMLing


�� ��Դ:��ˮľ���� newsmth.net��[FROM: 114.249.220.*]
Technical Details
Message-ID: <4j7F91$Bj9@newsmth.net>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!goblin3!goblin1!goblin.stu.neva.ru!feeds.phibee-telecom.net!news.byr.edu.cn!news.newsmth.net!NEWSMTH

Show Full Headers
Complete Article Headers
X-Google-Thread: f7ebf7e2af,4529a979cb960e79,start
X-Google-Attributes: gidf7ebf7e2af,public,usenet
X-Google-NewGroupId: yes
X-Google-Language: Chinese,GB
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!goblin3!goblin1!goblin.stu.neva.ru!feeds.phibee-telecom.net!news.byr.edu.cn!news.newsmth.net!NEWSMTH
From: thinkhy@newsmth.net-SPAM.no (<Test/>)
Newsgroups: cn.bbs.comp.xml
Subject: XML���ܺ�ǩ��(ת��)
Date: 22 Nov 2009 15:31:42 GMT
Organization: ˮľ����
Message-ID: <4j7F91$Bj9@newsmth.net>
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: XML/Q/M.1258903729.50