![]() What Engineers Know And How They Know It Pdf Stephen on this page. Keep in mind to satisfy the password requirements configured in DotNetNuke. It is not required to use the method, you can substitute it with you own logic. ![]() 1: string userName = 'sampleUserName' 2: 3: //generate a random 8 character password 4: string password = UserController.GeneratePassword(8) 5: 6: //get the machine's encryption key 7: string key = Convert.ToString(Globals.HostSettings) 8: 9: //encrypt the password with the machines encryption key 10: PortalSecurity portalSecurity = new PortalSecurity() 11: password = portalSecurity.Encrypt(key, password) Line 4: We generate a random 8 character password using the static GeneratePassword in the UserController class. Requirements: The code listed below uses the following classes that can be found in the assembly: DotNetNuke.dll Listed below is some sample code that can be used. ![]() There is existing functionality in DotNetNuke that can be reused to encrypt plain text passwords. In DotNetNuke, by default the passwords are encrypted using one way Triple DES algorithm. When programmatically creating a DotNetNuke portal, the CreatePortal method API expects passwords that are already encrypted.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |