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 www.marklogic.com Click http://po.st/hMGDFm to get your free NoSQL For Dummies e-book! From: Raghu <[email protected]<mailto:[email protected]>> Reply-To: MarkLogic Developer Discussion <[email protected]<mailto:[email protected]>> Date: Wednesday, August 5, 2015 at 11:15 AM To: MarkLogic Developer Discussion <[email protected]<mailto:[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]<mailto:[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]<mailto:[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
