Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
Questiondesign website Could not find schema information for the element 'http://schemas.microsoft.com/.NetConfiguration/v2.0:configuration' ? Pin
Member 24584679-Sep-18 16:20
Member 24584679-Sep-18 16:20 
AnswerRe: design website Could not find schema information for the element 'http://schemas.microsoft.com/.NetConfiguration/v2.0:configuration' ? Pin
Matias Lopez12-Sep-18 10:31
Matias Lopez12-Sep-18 10:31 
QuestionEncrypt string to 10 random characters Pin
Mohammad Azeem9-Sep-18 10:13
Mohammad Azeem9-Sep-18 10:13 
AnswerRe: Encrypt string to 10 random characters Pin
Dave Kreskowiak9-Sep-18 10:59
mveDave Kreskowiak9-Sep-18 10:59 
AnswerRe: Encrypt string to 10 random characters Pin
Eddy Vluggen9-Sep-18 11:34
professionalEddy Vluggen9-Sep-18 11:34 
AnswerRe: Encrypt string to 10 random characters Pin
OriginalGriff9-Sep-18 19:38
mveOriginalGriff9-Sep-18 19:38 
GeneralRe: Encrypt string to 10 random characters Pin
Mohammad Azeem9-Sep-18 20:10
Mohammad Azeem9-Sep-18 20:10 
GeneralRe: Encrypt string to 10 random characters Pin
OriginalGriff9-Sep-18 20:27
mveOriginalGriff9-Sep-18 20:27 
So store the user input away somewhere - a DB maybe - and use a "place holder" value to indicate it. When they want to retrieve it, you cross reference the string back to the original store and you have the string they started with.

The problem is that 10 characters is unusual, most hashes these days start at 128 bits, which won't fit in 10 chars no matter what you do with it.
Suggestion: if you use A-Z and 0-9 that's 36 possible characters - that's a total of 3E15 combinations (36^10) which fits in a 64 bit integer. So ... if you use a random number generator to generate a value in the range 0 to 3E15 (and check it isn't used, if it is regenerate) you could convert that to a 10 character string very easily, and that can be converted back to a big integer and used to lookup the actual string to return.

Make sense?
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

GeneralRe: Encrypt string to 10 random characters Pin
Mohammad Azeem9-Sep-18 20:34
Mohammad Azeem9-Sep-18 20:34 
GeneralRe: Encrypt string to 10 random characters Pin
OriginalGriff9-Sep-18 21:14
mveOriginalGriff9-Sep-18 21:14 
QuestionDrag and drop user-control from stack-panel to Windows Explore(or Desktop) for saving it to PNG in C# wpf Pin
Member 133785039-Sep-18 0:09
Member 133785039-Sep-18 0:09 
AnswerRe: Drag and drop user-control from stack-panel to Windows Explore(or Desktop) for saving it to PNG in C# wpf Pin
Eddy Vluggen9-Sep-18 0:22
professionalEddy Vluggen9-Sep-18 0:22 
GeneralRe: Drag and drop user-control from stack-panel to Windows Explore(or Desktop) for saving it to PNG in C# wpf Pin
Member 133785039-Sep-18 1:13
Member 133785039-Sep-18 1:13 
GeneralRe: Drag and drop user-control from stack-panel to Windows Explore(or Desktop) for saving it to PNG in C# wpf Pin
Eddy Vluggen9-Sep-18 2:10
professionalEddy Vluggen9-Sep-18 2:10 
GeneralRe: Drag and drop user-control from stack-panel to Windows Explore(or Desktop) for saving it to PNG in C# wpf Pin
Member 133785039-Sep-18 8:09
Member 133785039-Sep-18 8:09 
GeneralRe: Drag and drop user-control from stack-panel to Windows Explore(or Desktop) for saving it to PNG in C# wpf Pin
Eddy Vluggen9-Sep-18 8:20
professionalEddy Vluggen9-Sep-18 8:20 
QuestionForms opening other forms Pin
Member 112336117-Sep-18 20:33
Member 112336117-Sep-18 20:33 
AnswerRe: Forms opening other forms Pin
OriginalGriff7-Sep-18 21:20
mveOriginalGriff7-Sep-18 21:20 
GeneralRe: Forms opening other forms Pin
Member 112336118-Sep-18 0:03
Member 112336118-Sep-18 0:03 
GeneralRe: Forms opening other forms Pin
Member 112336118-Sep-18 0:06
Member 112336118-Sep-18 0:06 
GeneralRe: Forms opening other forms Pin
OriginalGriff8-Sep-18 0:07
mveOriginalGriff8-Sep-18 0:07 
GeneralRe: Forms opening other forms Pin
Matias Lopez11-Sep-18 8:50
Matias Lopez11-Sep-18 8:50 
QuestionC# project - SMS Alert Pin
Member 124675946-Sep-18 21:51
Member 124675946-Sep-18 21:51 
AnswerRe: C# project - SMS Alert Pin
OriginalGriff6-Sep-18 22:05
mveOriginalGriff6-Sep-18 22:05 
AnswerRe: C# project - SMS Alert Pin
DerekT-P13-Sep-18 1:01
professionalDerekT-P13-Sep-18 1:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.