CALCULATING DIGEST OF AN AUTHENTICATION STATEMENT

Dear Sirs, my name is Gianluca from Italy
 I'm trying to calculate the Digest value of a SAML Authentication
STatement whith the SHA-1 algorithm. Let us suppose that we are dealing
with a string representing the following node:

<saml:AuthenticationStatement>
    <saml:Subject>
        <saml:NameIdentifier>GIANLUCA</saml:NameIdentifier>
    </saml:Subject>
</saml:AuthenticationStatement>

When I try to calculate SHA-1 with the function  b64_sha1(str2Digest)  what
exactly should the string str2Digest contain? I mean it should be equal to
"<saml:AuthenticationStatement><saml:Subject><saml:NameIdentifier>GIANLUCA<
/saml:NameIdentifier></saml:Subject></saml:AuthenticationStatement>"
or only "GIANLUCA" or ....what else?

Thank you in advance for help.
XML.org Focus Areas: BPEL | DITA | ebXML | IDtrust | OpenDocument | SAML | UBL | UDDI
OASIS sites: OASIS | Cover Pages | XML.org | AMQP | Blue | CGM Open | eGov | Emergency | IDtrust | LegalXML | Open CSA | WS-I