|
Well it depends on what you are after but the most common way of handling passwords in databases is to first use a hash algorithmn to hash the password and store it in a database.
When you need to compare a password with the one in the database (such as when a user is logging in) you do the following:
1. Hash the user entered password using the same algorithmn as above.
2. Get the hashed correct password from the database and compare against the user entered password.
3. If they match then the entered password is correct, otherwise the entered password is incorrect.
A hash is a way of uniquely identifing an object, however you cannot retrieve the object from the hash value. Therefore applying a hash to an object is one-way.
You shouldn't really ever need to display someone's password as clear text.
|
|
|
|
|
I have a collection that contains Row objects. One of the classes derived from Row has its own collection of Row objects (called GroupRow ).
Now. If i specify the row number of 10, it may not be in the original collection, but could be part of the GroupRow objects collection..or better still, one of the rows in the grouprow objects collection could be a group object and its in there....to an infinite extent.
My problem is, i need to be able to get the row - no matter how many groups i have to go through to get it - only i cant work out how im supposed to do this...any ideas?
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|
|
This sounds like a heirarchy problem - can you provide an example of how you have setup the RowsCollection class?
|
|
|
|
|
its a simple collection classes, derived from CollectionBase. David stone said i should use Recursion, only i dont have a clue how i would use it.
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|
|
Has anyone seen one written in c#, I'm looking for an example to write my own for a very specific problem. ( CNC Machine GCode editor)
Thanks
viva AMIGA
|
|
|
|
|
|
THANKS, LOOKS NICE, BUT I WAS REALLY LOOKING FOR SOME EXAMPLE CODE SO i COULD SEE HOW TO HANDLE THE CARET IN DOT NET
viva AMIGA
|
|
|
|
|
Its true what the say, alcohol makes you talk too louder!
David Gallagher wrote:
THANKS, LOOKS NICE, BUT I WAS REALLY LOOKING FOR SOME EXAMPLE CODE SO i COULD SEE HOW TO HANDLE THE CARET IN DOT NET
So why didnt you ask that? I guess you would use platform invoke and call the unmanaged caret functions.
Furthermore you can use a decompiler to see how the person implemented his "caret".
MyDUMeter: a .NET DUMeter clone
|
|
|
|
|
leppie wrote:
Furthermore you can use a decompiler to see how the person implemented his "caret".
Isnt that cheating?
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|
|
Nnamdi Onyeyiri wrote:
Isnt that cheating?
I call it learning as the persons class as it is, wont be of much use as it is. I meant get the idea from it. Not steal code.
CHeers
PS: Dont you ever look into the .NET's source? Sometimes MSDN is not suffiecient in telling you what a funtion does.
MyDUMeter: a .NET DUMeter clone
|
|
|
|
|
Nope...i never do.
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|
|
|
nope.
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|
|
|
1001111111011101111100111100101011110011110100101110010011010010 Sonork | 100.21142 | TheEclypse
|
|
|
|
|
Hi , Roger - Compona here.
We draw the caret via code , we dont use the system caret.
the primary reason is that we want to keep the editor itself as clean as possible from win32 api calls , so that it will be as easy as possible to port it to other platforms in the future.
(it uses gdi32 to draw , but the painterclass is replacable so one can easily exchange it to a gdi+ painter or whatever)
regadring decompilation:
our editor is obfuscated so hopfully it will not expose too much of its internals :P
(otherwise we have source licenses for 255 usd per developer that is going to use it.. *grin*)
//Roger
|
|
|
|
|
Sharp develop[^] is a whole IDE written in C# and I believe you can download its source code as well.
"We will thrive in the new environment, leaping across space and time, everywhere and nowhere, like air or radiation, redundant, self-replicating, and always evolving." -unspecified individual
|
|
|
|
|
I need a simple way to get short file name for display. For example, I have full file name C:\Dir1\Samples\Files\Doc\Figures.doc and maximum length 30, and result should be like this: C:\Dir1\...\Doc\Figures.doc.
string s = ShortFileName("C:\\Dir1\\Samples\\Files\\Doc\\Figures.doc");
// s = "C:\Dir1\...\Doc\Figures.doc"
string ShortFileName(string fullName, int maxLen)
{
// ???
}
|
|
|
|
|
Try this:
using System;
using System.Text;
using System.Runtime.InteropServices;
public class PathUtils
{
public const int MAX_PATH = 260;
[DllImport("shlwapi.dll", CharSet = CharSet.Auto)]
private static extern bool PathCompactPathEx(
StringBuilder pszOut, string pszPath,
int cchMax, int reserved);
public static string CompactPath(string path, int maxLen)
{
StringBuilder pszOut = new StringBuilder(MAX_PATH);
if (PathCompactPathEx(pszOut, path, maxLen, 0))
{
return pszOut.ToString();
}
else
{
return path;
}
}
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
|
|
|
|
|
Thank you very much, works great.
|
|
|
|
|
The problem I have is as follows:
I have a large number of classes (each having different data members, over 300) which I wish to store the member data within a data blob in a SQL DB (Just one data table). The DB table has the class type and a data blob. Upon retriving the data from the table, the class type is viewed to determine which class to address, and then call the class to extract the data blob. In C++ I would have used a memcpy(), is there a good way of creating and extracting the data blobs, or equiverant to memcpy without having to use unmanaged code.
|
|
|
|
|
Are you referring to something like you would get if your classes were [Serializable]? If so, a memory stream might get you where you want to go.
John :D
|
|
|
|
|
Hi!
i want to build custom open dialog (which have extra funtionality of preview of selected file) and should also provide same functionality as standard OpenDialog..but we cant inherit FileOpenDialog.. what should i do? rebuild all that ??
sorry for my bad English.
|
|
|
|
|
i think you will have to rebuild it....or i can give you my old open file dialog..thank you can rebuild/remake.. i never finished it...you will have to do alot of work...but the tree view stuff is done. let me know what if you want it. if so its all yours
The Code Project Is Your Friend...
|
|
|
|
|
if u could send it...i'll be really gratefull..Thanx in advance
|
|
|
|