Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Christian Freihoff on July 13, 2016, 02:07:15 pm
-
I'd like to add users to the t_secuser table in the database. Therefore i need to know how the password encryption is done. PW should be a salted hash value, but which algorithm and which salt? What about that UserId? Values like {5289B49E-4DF8-49ea-85BB-10E5F20917A9} are there for existing users...
thanks in advance
-
I doubt whether Sparx will reveal that info.
(I'm not sure how it is now, but up until shortly the "encryption" was not salted. If two users had the same password the encryption ended up with the same result)
Geert
-
Having an API like Respository.AddUser (name, pw) would probably be fine enough.
q.
-
Hi Christian,
The password encryption algorithm, as others have noted, is not published. Not sure why.
One way forward would be to create a user with a non-secure password (like "password"), copy what's been added to t_secuser.Password and use that in your code. Don't know if that would work, but worth a try.
The user ID is simple, however. It's just a GUID, and generating one of those is easy -- EA's API does not have a function for it, but Microsoft COM (https://msdn.microsoft.com/en-us/library/windows/desktop/ms688568(v=vs.85).aspx) does, and as like as not that's what EA uses as well.
HTH,
/Uffe