Hi,
Referred the websites below
http://stackoverflow.com/questions/25457943/xdmphash64-equivalent-in-java
http://iswwwup.com/t/d920b2cb9d40/xdmp-hash64-equivalent-in-java.html
As suggested gone for the SHA / MD5 algorithms in java which has its
equivalent below APIs in xquery.
- xdmp:hmac-md5 <https://docs.marklogic.com/xdmp:hmac-md5>
- xdmp:hmac-sha1 <https://docs.marklogic.com/xdmp:hmac-sha1>
- xdmp:hmac-sha256 <https://docs.marklogic.com/xdmp:hmac-sha256>
- xdmp:hmac-sha512 <https://docs.marklogic.com/xdmp:hmac-sha512>
Thanks,
Sumathi.
On Wed, Aug 5, 2015 at 11:40 AM, Paul Hoehne <[email protected]>
wrote:
> MD5 and SHA1 are standardized and available in Java. Generally you will
> need to convert the binary hash value (returned in Java as bytes) to a
> hexidecimal number. Make suer you generate the same number on bot the
> XQuery and Java side of the equation. Make sure you add leading zeros and
> make sure you use the same case, so you don’t accidentally generate
> ‘03b7d405’ on one server and ‘3B7D45’ on the other.
>
> *Paul Hoehne*
> Senior Consultant
> MarkLogic Corporation
> [email protected]
> mobile:* +1 571-992-8869 <%2B1%20571-992-8869>*
> www.marklogic.com
>
> Click http://po.st/hMGDFm to get your free NoSQL For Dummies e-book!
>
> From: Raghu <[email protected]>
> Reply-To: MarkLogic Developer Discussion <[email protected]>
> Date: Wednesday, August 5, 2015 at 11:15 AM
> To: MarkLogic Developer Discussion <[email protected]>
> Subject: Re: [MarkLogic Dev General] Fwd: xdmp:hash32 and xdmp:hash64
> algorithm
>
> Hi all,
>
> To add to that question, I have a requirement, I have to hash certain
> value at xquery end and the same value has to be hashed/unhashed at Java
> end. Is there a hashing function in Marklogic which exactly matches with
> Java hash implementation?
>
> Thanks in advance!
> Raghu
>
> On Wed, Aug 5, 2015 at 10:49 AM, sweet frd <[email protected]>
> wrote:
>
>>
>> Hi,
>>
>> The xdmp hash APIs are using which algorithm?. how it is converting
>> the string to unsignedInt? on which basis?
>>
>> Thanks in Advance
>> Sumathi.
>>
>>
>> _______________________________________________
>> General mailing list
>> [email protected]
>> Manage your subscription at:
>> http://developer.marklogic.com/mailman/listinfo/general
>>
>>
>
> _______________________________________________
> General mailing list
> [email protected]
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
>
_______________________________________________
General mailing list
[email protected]
Manage your subscription at:
http://developer.marklogic.com/mailman/listinfo/general