Click here to Skip to main content
15,910,211 members
Home / Discussions / C#
   

C#

 
GeneralRe: Cascading combobox datatable bind and selected index changed event Pin
Christian Graus15-Sep-09 22:12
protectorChristian Graus15-Sep-09 22:12 
GeneralRe: Cascading combobox datatable bind and selected index changed event Pin
vidhyaravichandar15-Sep-09 22:19
vidhyaravichandar15-Sep-09 22:19 
GeneralRe: Cascading combobox datatable bind and selected index changed event Pin
Christian Graus15-Sep-09 22:56
protectorChristian Graus15-Sep-09 22:56 
QuestionMore proxies in IE browser applications Pin
Member 441789215-Sep-09 21:13
Member 441789215-Sep-09 21:13 
QuestionNotify Icon Pin
Matthew Hazlett15-Sep-09 21:09
Matthew Hazlett15-Sep-09 21:09 
AnswerRe: Notify Icon Pin
Abhishek Sur15-Sep-09 22:31
professionalAbhishek Sur15-Sep-09 22:31 
GeneralRe: Notify Icon Pin
Matthew Hazlett16-Sep-09 5:53
Matthew Hazlett16-Sep-09 5:53 
GeneralRe: Notify Icon Pin
Matthew Hazlett16-Sep-09 6:24
Matthew Hazlett16-Sep-09 6:24 
Questiongrid view Pin
Member 59031015-Sep-09 21:09
Member 59031015-Sep-09 21:09 
AnswerRe: grid view Pin
Christian Graus15-Sep-09 21:19
protectorChristian Graus15-Sep-09 21:19 
QuestionService not running for Impersonated user with CreateProcessAsUser [C#] Pin
Shaitan0015-Sep-09 20:28
Shaitan0015-Sep-09 20:28 
AnswerRe: Service not running for Impersonated user with CreateProcessAsUser [C#] Pin
Shaitan0016-Sep-09 4:31
Shaitan0016-Sep-09 4:31 
QuestionFlowLayoutPanel SizeChanged event Pin
wILDFriCK15-Sep-09 20:24
wILDFriCK15-Sep-09 20:24 
AnswerRe: FlowLayoutPanel SizeChanged event Pin
carlecomm21-Sep-09 23:19
carlecomm21-Sep-09 23:19 
QuestionUpdate contents of Folder before Installation of MSI file Pin
Abdul Rahman Hamidy15-Sep-09 20:07
Abdul Rahman Hamidy15-Sep-09 20:07 
AnswerRe: Update contents of Folder before Installation of MSI file Pin
Christian Graus15-Sep-09 20:08
protectorChristian Graus15-Sep-09 20:08 
AnswerRe: Update contents of Folder before Installation of MSI file Pin
N a v a n e e t h15-Sep-09 20:14
N a v a n e e t h15-Sep-09 20:14 
GeneralRe: Update contents of Folder before Installation of MSI file Pin
Abdul Rahman Hamidy15-Sep-09 21:53
Abdul Rahman Hamidy15-Sep-09 21:53 
AnswerRe: Update contents of Folder before Installation of MSI file Pin
Vimalsoft(Pty) Ltd15-Sep-09 21:01
professionalVimalsoft(Pty) Ltd15-Sep-09 21:01 
GeneralRe: Update contents of Folder before Installation of MSI file Pin
Abdul Rahman Hamidy16-Sep-09 3:17
Abdul Rahman Hamidy16-Sep-09 3:17 
GeneralRe: Update contents of Folder before Installation of MSI file Pin
Vimalsoft(Pty) Ltd16-Sep-09 3:18
professionalVimalsoft(Pty) Ltd16-Sep-09 3:18 
QuestionHow to make a simple stream cipher encryption for C# Pin
wSheng8715-Sep-09 19:50
wSheng8715-Sep-09 19:50 
AnswerRe: How to make a simple stream cipher encryption for C# Pin
Christian Graus15-Sep-09 20:10
protectorChristian Graus15-Sep-09 20:10 
AnswerRe: How to make a simple stream cipher encryption for C# Pin
PIEBALDconsult16-Sep-09 7:12
mvePIEBALDconsult16-Sep-09 7:12 
It really depends on how much security you need.
If you need a lot of security then you're not likely to be able to retain the 10-digit requirement.
If only a little security is need then maybe you don't need any at all. Big Grin | :-D

Can you give more information?

Anyway... this may be an area where just a little security can go a long way; after all, how would someone who intercepts the message know he had correctly deciphered the number?

The following code is an example of a very simple/non-secure encription algorithm, similar to ROT13[^]:

private static readonly System.Collections.Generic.Dictionary<char,char> wombat ;
 
static Template
(
)
{
    wombat = new System.Collections.Generic.Dictionary<char,char>() ;
 
    wombat [ '0' ] = '9' ;
    wombat [ '1' ] = '8' ;
    wombat [ '2' ] = '7' ;
    wombat [ '3' ] = '6' ;
    wombat [ '4' ] = '5' ;
    wombat [ '5' ] = '4' ;
    wombat [ '6' ] = '3' ;
    wombat [ '7' ] = '2' ;
    wombat [ '8' ] = '1' ;
    wombat [ '9' ] = '0' ;
 
    return ;
}
 
private static string
Wombat
(
    string s
)
{
    System.Text.StringBuilder result = new System.Text.StringBuilder() ;
 
    foreach ( char c in s )
    {
        if ( wombat.ContainsKey ( c ) )
        {
            result.Append ( wombat [ c ] ) ;
        }
        else
        {
            result.Append ( c ) ;
        }
    }
 
    return ( result.ToString() ) ;
}


If more security is required, you could extend this to provide for passing a "key" between partners, but you would then need separate encription and decription methods.
GeneralRe: How to make a simple stream cipher encryption for C# Pin
wSheng8716-Sep-09 16:35
wSheng8716-Sep-09 16:35 

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.