I have a problem with normal DES encryption in C#, I want an output string with 16 char length (16 bytes 128 bit) that it contains only alphabetic and numeric characters.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are limited to 16-character output consisting only of alphanumeric characters, it means you have ~95 bits of output space available (exactly 96 bits if you could use Base-64 encoding, i.e. include 2 non-alphanumeric characters).
Therefore, nothing you could do would allow you to encrypt more than 95 bits with this restriction. If this is sufficient for you, it is possible.
Something like this (3DES in CTR mode) is an example how it could work (using Base-64), but as stated above in the comments, it really depends on what you really are trying to do.