开发者

Comparing 2 string format SIDs

开发者 https://www.devze.com 2023-02-27 12:38 出处:网络
Can I compare 2 string-format SIDs for equality? As per my understanding, a Group SID is a unique identifier in an Active Directory forest, so the string that I get by using ConvertSidToStringSid wi

Can I compare 2 string-format SIDs for equality?

As per my understanding, a Group SID is a unique identifier in an Active Directory forest, so the string that I get by using ConvertSidToStringSid will also be unique and can thus be compared to any other Group SID (string format) by using strin开发者_开发技巧g comparison functions?


AFAIK the answer is "yes as long as you're using case insensitive comparison".

However, if I were you I'd consider using the EqualSid API to compare them as binary, and only convert them to string to show to the end user of your software.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号