Skip to content
This repository was archived by the owner on Aug 10, 2023. It is now read-only.
This repository was archived by the owner on Aug 10, 2023. It is now read-only.

With algorithm using for creating digest value in metro #45

@Shkarbatov

Description

@Shkarbatov

I have service with SOAP authentication, one of my client use php at their side, but we can't understand, how to create DigestValue.

We trying next:

// Before make hash using canonicalize http://php.net/manual/en/domnode.c14n.php
$data = '<wsu:Timestamp wsu:Id="TS-1"><wsu:Created>2018-10-23T06:20:36.133Z</wsu:Created><wsu:Expires>2018-10-23T06:37:16.133Z</wsu:Expires></wsu:Timestamp>';
base64_encode(hash('sha1', $data, true));

But receive wrong digest value: +qaxdSqNQ29JGMeHvoTQqg7lxww=


This is correct DigestValue from another java client:

<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>B06W6ZeLb4X7bBUuqJ8ke2uA/hw=</ds:DigestValue>

<wsu:Timestamp wsu:Id="TS-1"><wsu:Created>2018-10-23T06:20:36.133Z</wsu:Created><wsu:Expires>2018-10-23T06:37:16.133Z</wsu:Expires></wsu:Timestamp>

Help me please with algorithm, can't find any information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions