<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Password Encryption</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2009 : Password Encryption</description>
  <pubDate>Sat, 11 Apr 2026 07:54:03 -700</pubDate>
  <lastBuildDate>Fri, 14 Nov 2008 08:09:31 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=1001</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Password Encryption : Thanks for your info.   Another...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1001&amp;PID=3633#3633</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=399" rel="nofollow">LesleySastro</a><br /><strong>Subject:</strong> 1001<br /><strong>Posted:</strong> 14-Nov-2008 at 8:09am<br /><br />Thanks for your info. <DIV>&nbsp;</DIV><DIV>Another question, will your method result in the same output. So if I compare the result of <FONT face="Courier New"><FONT size=2><FONT face=Verdana>same&nbsp;</FONT><FONT face="Courier New"><FONT color=#2b91af>CodingFns</FONT>.EncodeBase64(<FONT color=#2b91af><FONT color=#2b91af>CryptoFns</FONT></FONT>.AesGetHashKey(password))</FONT> <FONT face=Verdana>and </FONT><FONT face="Courier New"><FONT color=#2b91af>CryptoFns</FONT>.MD5HashUTF16ToString(password) </FONT><FONT face=Verdana>will it be equal?</FONT></FONT></FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>That is for me very important, because I have a legacy database with all the passwords stored in it, and I must be able to access/compare it with the new method.</FONT></DIV>]]>
   </description>
   <pubDate>Fri, 14 Nov 2008 08:09:31 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1001&amp;PID=3633#3633</guid>
  </item> 
  <item>
   <title>Password Encryption : This will do it:   CodingFns...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1001&amp;PID=3630#3630</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=4" rel="nofollow">GregD</a><br /><strong>Subject:</strong> 1001<br /><strong>Posted:</strong> 13-Nov-2008 at 4:03pm<br /><br /><DIV><FONT size=2><FONT color=#2b91af>This will do it:</FONT></FONT></DIV><DIV><FONT color=#2b91af size=2></FONT>&nbsp;</DIV><DIV><FONT size=2><FONT face="Courier New, Courier, mono"><FONT color=#2b91af>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CodingFns</FONT>.EncodeBase64(<FONT color=#2b91af><FONT color=#2b91af>CryptoFns</FONT></FONT>.AesGetHashKey(password));</FONT></FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>I didn't include the salt in the above, but you could easily add that.</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>CryptoFns.AesGetHashKey() returns the hash as a byte array; EncodeBase64 converts the byte array to a string.</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>In case it's useful, here's a little method I wrote recently to update (hashed) passwords in the NorthwindIB database:</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2><FONT face="Courier New, Courier, mono">private void _updatePasswordButton_Click(object sender, EventArgs e) {<BR>&nbsp; string userName = (string)_userNameComboBox.SelectedItem;<BR>&nbsp; string password = _newPasswordTextBox.Text.Trim();<BR>&nbsp; User aUser = _mgr.Users.Where(u =&gt; u.UserName == userName).FirstOrNullEntity();<BR>&nbsp; if (!aUser.EntityAspect.IsNullEntity) {<BR>&nbsp;&nbsp;&nbsp; aUser.UserPassword = CodingFns.EncodeBase64(CryptoFns.AesGetHashKey(password));<BR>&nbsp; }<BR>&nbsp; else {<BR>&nbsp;&nbsp;&nbsp; MessageBox.Show("Couldn't find that user!");<BR>&nbsp; }<BR>&nbsp; SaveAllChanges();<BR>}</FONT><BR></DIV><P></FONT><FONT size=2><FONT face="Courier New, Courier, mono"></FONT></FONT>&nbsp;</P><DIV></DIV><FONT face="Courier New"><FONT face="Verdana, Arial, Helvetica, sans-serif" size=2>_mgr in the above is defined elsewhere as a DomainModelEntityManager and set to DomainModelEntityManager.DefaultManager.&nbsp; I populated the comboBox as follows:</FONT><DIV></DIV><DIV><FONT size=2></FONT></DIV><P><FONT size=2>private void ConfigureComboBox() {<BR>&nbsp; foreach (string aUserName in _mgr.Users.OrderBy(u=&gt;u.UserName).Select(u =&gt; u.UserName)) {<BR>&nbsp;&nbsp;&nbsp; _userNameComboBox.Items.Add(aUserName);<BR>&nbsp; }<BR>}<BR></FONT></P></FONT>]]>
   </description>
   <pubDate>Thu, 13 Nov 2008 16:03:08 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1001&amp;PID=3630#3630</guid>
  </item> 
  <item>
   <title>Password Encryption : In DevForce Classic I used the...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1001&amp;PID=3625#3625</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=399" rel="nofollow">LesleySastro</a><br /><strong>Subject:</strong> 1001<br /><strong>Posted:</strong> 13-Nov-2008 at 12:48pm<br /><br />In DevForce Classic I used the following statement to store encrypted passwords in the database<DIV><FONT color=#0000ff size=2></FONT>&nbsp;</DIV><DIV><FONT color=#0000ff size=2>return</FONT><FONT size=2> <strong>IdeaBlade.Util.CryptoFns.MD5HashUTF16ToString</strong>(pPassword.Trim() + pSalt.Trim());</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>I'm currently in the process of migrating/rewriting that application to DevForce EF and I have noticed that the above function does not exist in assembly Ideablade.Util.v4. Does anybody know where I can find the same functionality?</FONT></DIV>]]>
   </description>
   <pubDate>Thu, 13 Nov 2008 12:48:19 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1001&amp;PID=3625#3625</guid>
  </item> 
 </channel>
</rss>