Class GuidHelper
java.lang.Object
com.atlassian.crowd.directory.ldap.util.GuidHelper
Util for GUID (externalId) transformations
- Since:
- v2.7.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringconvertToADGUID(String guid) Converts the HEX GUID to AD GUIDstatic StringencodeGUIDForSearch(String guid) Returns Byte String representation of GUID suitable for search.static StringgetGUIDAsString(byte[] inArr) The returned representation doesn't match AD's string representation, but it doesn't matter as the GUID should be treated as an opaque identifier.
-
Field Details
-
BS
- See Also:
-
-
Constructor Details
-
GuidHelper
public GuidHelper()
-
-
Method Details
-
getGUIDAsString
The returned representation doesn't match AD's string representation, but it doesn't matter as the GUID should be treated as an opaque identifier. Basically, the method is a byte array to hex string. AD chooses to order the hex string in partial reverse, eg. Normal Hex String: 6797e1e5ecb5154f960f865c28c015fa AD Formatted String: e5e19767-b5ec-4f15-960f-865c28c015fa This method returns the "normal" hex string.- Parameters:
inArr- guid- Returns:
- guid in byte-string form
-
convertToADGUID
Converts the HEX GUID to AD GUID -
encodeGUIDForSearch
Returns Byte String representation of GUID suitable for search.Example:
Input: 6797e1e5ecb5154f960f865c28c015fa Result: \67\97\e1\e5\ec\b5\15\4f\96\0f\86\5c\28\c0\15\fa
- Parameters:
guid- the guid to be used in search- Returns:
- byte string encoded form for AD search
-