473,398 Members | 2,188 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Total confused and need help with small encryption and decryption methods

Hello Everyone,
Long time ago, I posted a small problem I had about converting a VB6
program to C#. Well with the help with everyone I got it converted.
But I overlooked something and don't understand why it is doing this.
Below is my code, I would be greatfull if someone can guide me through
the right path or even help me solve this issue.

Problem: The old tool which was written in VB6 works perfect. But I
needed to convert this to C# using since there are new tools we are
creating that would like to leverage this style of security. The
problem is that the encryption method is not working as it should. The
decryption method works perfect. Just having problems with the
encryption part.

Test Values:
Current Encrypted Value - 0835262B27
Value returned using Decrypt method - anna

Current Decrypted Value - anna
Value returned using Encrypted method - 35262B27

*** As you can see the encryption method is returning something
different then the original encrypted value. *** PLEASE HELP !!! ***

CODE:

static byte[] ParseHex(string text)
{
byte[] ret = new byte[text.Length / 2];
for (int i = 0; i < ret.Length; i++)
{
ret[i] = Convert.ToByte(text.Substring(i * 2, 2), 16);
}
return ret;
}

public static string Decrypt("THEFELDGROUP", string encrypted)
{
byte[] binary = ParseHex(encrypted);
char[] chars = new char[binary.Length];
for (int i = 0; i < chars.Length; i++)
{
chars[i] = (char)(binary[i] ^ password[i % password.Length]);
}
return new string(chars);
}
public static string Encrypt("THEFELDGROUP", string
strG)
{
char[] cHexDigits = {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
};

// the encoded integer value of the current character in the string
byte byteEncoded;

System.Text.StringBuilder sbReturned = new
System.Text.StringBuilder();

for (int i = 0; i < strG.Length; ++i)
{
// encode the current character
byteEncoded = (byte)(((int)strG[i]) ^ ((int)strPass[i %
strPass.Length]));

// output the Hex character value of the above encoded value
sbReturned.Append(cHexDigits[byteEncoded >>
4]).Append(cHexDigits[byteEncoded & 0xF]);
}

return sbReturned.ToString();
}

Apr 3 '07 #1
8 2708
On 3 Apr, 18:18, manmit.wa...@gmail.com wrote:
Hello Everyone,
Long time ago, I posted a small problem I had about converting a VB6
program to C#. Well with the help with everyone I got it converted.
But I overlooked something and don't understand why it is doing this.
Below is my code, I would be greatfull if someone can guide me through
the right path or even help me solve this issue.

Problem: The old tool which was written in VB6 works perfect. But I
needed to convert this to C# using since there are new tools we are
creating that would like to leverage this style of security. The
problem is that the encryption method is not working as it should. The
decryption method works perfect. Just having problems with the
encryption part.

Test Values:
Current Encrypted Value - 0835262B27
Value returned using Decrypt method - anna

Current Decrypted Value - anna
Value returned using Encrypted method - 35262B27

*** As you can see the encryption method is returning something
different then the original encrypted value. *** PLEASE HELP !!! ***

CODE:

static byte[] ParseHex(string text)
{
byte[] ret = new byte[text.Length / 2];
for (int i = 0; i < ret.Length; i++)
{
ret[i] = Convert.ToByte(text.Substring(i * 2, 2), 16);
}
return ret;
}

public static string Decrypt("THEFELDGROUP", string encrypted)
{
byte[] binary = ParseHex(encrypted);
char[] chars = new char[binary.Length];
for (int i = 0; i < chars.Length; i++)
{
chars[i] = (char)(binary[i] ^ password[i % password.Length]);
}
return new string(chars);
}

public static string Encrypt("THEFELDGROUP", string
strG)
{
char[] cHexDigits = {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
};

// the encoded integer value of the current character in the string
byte byteEncoded;

System.Text.StringBuilder sbReturned = new
System.Text.StringBuilder();

for (int i = 0; i < strG.Length; ++i)
{
// encode the current character
byteEncoded = (byte)(((int)strG[i]) ^ ((int)strPass[i %
strPass.Length]));

// output the Hex character value of the above encoded value
sbReturned.Append(cHexDigits[byteEncoded >>
4]).Append(cHexDigits[byteEncoded & 0xF]);
}

return sbReturned.ToString();
}

Hi, I've had to tweak it a bit, and it seems you've posted the
password used to encrypt decrypt, although I couldn't have got the
same results without it :) Interestingly I get the second version
regardless of whether I decrypt or encrypt, and decrypting 0835262B27
gives me the completely wrong result. I.e. not anna

Can you confirm that you actually want 0835262B27 and not 35262B27?
The second seems correct to me as it's 4 bytes which I would expect as
anna is four chars long.

Now if the 08 is required that would convert to ascii bell(?) That's
assuming the text is encoded as ascii, I've not used much of the
encoding stuff as I have a small world view, so can't comment on
whether that would cause you issues or any other problems for that
matter.

Hope that helps

Apr 3 '07 #2
On Apr 3, 2:55 pm, "DeveloperX" <nntp...@operamail.comwrote:
On 3 Apr, 18:18, manmit.wa...@gmail.com wrote:


Hello Everyone,
Long time ago, I posted a small problem I had about converting a VB6
program to C#. Well with the help with everyone I got it converted.
But I overlooked something and don't understand why it is doing this.
Below is my code, I would be greatfull if someone can guide me through
the right path or even help me solve this issue.
Problem: The old tool which was written in VB6 works perfect. But I
needed to convert this to C# using since there are new tools we are
creating that would like to leverage this style of security. The
problem is that the encryption method is not working as it should. The
decryption method works perfect. Just having problems with the
encryption part.
Test Values:
Current Encrypted Value - 0835262B27
Value returned using Decrypt method - anna
Current Decrypted Value - anna
Value returned using Encrypted method - 35262B27
*** As you can see the encryption method is returning something
different then the original encrypted value. *** PLEASE HELP !!! ***
CODE:
static byte[] ParseHex(string text)
{
byte[] ret = new byte[text.Length / 2];
for (int i = 0; i < ret.Length; i++)
{
ret[i] = Convert.ToByte(text.Substring(i * 2, 2), 16);
}
return ret;
}
public static string Decrypt("THEFELDGROUP", string encrypted)
{
byte[] binary = ParseHex(encrypted);
char[] chars = new char[binary.Length];
for (int i = 0; i < chars.Length; i++)
{
chars[i] = (char)(binary[i] ^ password[i % password.Length]);
}
return new string(chars);
}
public static string Encrypt("THEFELDGROUP", string
strG)
{
char[] cHexDigits = {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
};
// the encoded integer value of the current character in the string
byte byteEncoded;
System.Text.StringBuilder sbReturned = new
System.Text.StringBuilder();
for (int i = 0; i < strG.Length; ++i)
{
// encode the current character
byteEncoded = (byte)(((int)strG[i]) ^ ((int)strPass[i %
strPass.Length]));
// output the Hex character value of the above encoded value
sbReturned.Append(cHexDigits[byteEncoded >>
4]).Append(cHexDigits[byteEncoded & 0xF]);
}
return sbReturned.ToString();
}

Hi, I've had to tweak it a bit, and it seems you've posted the
password used to encrypt decrypt, although I couldn't have got the
same results without it :) Interestingly I get the second version
regardless of whether I decrypt or encrypt, and decrypting 0835262B27
gives me the completely wrong result. I.e. not anna

Can you confirm that you actually want 0835262B27 and not 35262B27?
The second seems correct to me as it's 4 bytes which I would expect as
anna is four chars long.

Now if the 08 is required that would convert to ascii bell(?) That's
assuming the text is encoded as ascii, I've not used much of the
encoding stuff as I have a small world view, so can't comment on
whether that would cause you issues or any other problems for that
matter.

Hope that helps- Hide quoted text -

- Show quoted text -
Hello,
I am actually looking for the outcome to be 0835262B27 but I am
getting 35262B27. So you are right, that it is missing '08' but I
don't know why it is missing that variable.

Thanks

Apr 3 '07 #3
On 3 Apr 2007 10:18:00 -0700, ma**********@gmail.com wrote:
>Hello Everyone,
Long time ago, I posted a small problem I had about converting a VB6
program to C#. Well with the help with everyone I got it converted.
But I overlooked something and don't understand why it is doing this.
Below is my code, I would be greatfull if someone can guide me through
the right path or even help me solve this issue.

Problem: The old tool which was written in VB6 works perfect. But I
needed to convert this to C# using since there are new tools we are
creating that would like to leverage this style of security. The
problem is that the encryption method is not working as it should. The
decryption method works perfect. Just having problems with the
encryption part.

Test Values:
Current Encrypted Value - 0835262B27
Value returned using Decrypt method - anna

Current Decrypted Value - anna
Value returned using Encrypted method - 35262B27

*** As you can see the encryption method is returning something
different then the original encrypted value. *** PLEASE HELP !!! ***

CODE:

static byte[] ParseHex(string text)
{
byte[] ret = new byte[text.Length / 2];
for (int i = 0; i < ret.Length; i++)
{
ret[i] = Convert.ToByte(text.Substring(i * 2, 2), 16);
}
return ret;
}

public static string Decrypt("THEFELDGROUP", string encrypted)
This line does not compile. You probably should have written
something like:
public static string Decrypt(string password, string encrypted)

> {
byte[] binary = ParseHex(encrypted);
char[] chars = new char[binary.Length];
for (int i = 0; i < chars.Length; i++)
{
chars[i] = (char)(binary[i] ^ password[i % password.Length]);
}
return new string(chars);
}

public static string Encrypt("THEFELDGROUP", string strG)
Again this line does not compile:
public static string Encrypt(string strPass, string strG)
> {
char[] cHexDigits = {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
};

// the encoded integer value of the current character in the string
byte byteEncoded;

System.Text.StringBuilder sbReturned = new
System.Text.StringBuilder();

for (int i = 0; i < strG.Length; ++i)
{
// encode the current character
byteEncoded = (byte)(((int)strG[i]) ^ ((int)strPass[i %
strPass.Length]));

// output the Hex character value of the above encoded value
sbReturned.Append(cHexDigits[byteEncoded >>
4]).Append(cHexDigits[byteEncoded & 0xF]);
}

return sbReturned.ToString();
}
Your code does not have the "08" because you are encoding a four
character plaintext into a four byte (= 8 hex digits) cyphertext. I
suggest you have a close look at the VB original to see where the
initial "08" comes from, then you need to reproduce that in your C#
version. We do not have enough information here to see its origin.

Your encryption scheme, a stream cypher with a repeating key, is not
very secure. Good enough to deter casual observation but easily
breakable by anyone seriously interested. Repeating any part of the
keystream is a big weakness for any stream cypher.

rossum

Apr 3 '07 #4
I agree. It's better to use more secure methods such as
System.Security.Cryptography. There is little space here to explain in
detail, but I can give you an example if you want.

Freiddie
http://fei.yuanbw.googlepages.com/
http://freiddy.blogspot.com/
http://crazibe.blogspot.com/

Apr 3 '07 #5
On 3 Apr, 21:06, rossum <rossu...@coldmail.comwrote:
On 3 Apr 2007 10:18:00 -0700, manmit.wa...@gmail.com wrote:
Hello Everyone,
Long time ago, I posted a small problem I had about converting a VB6
program to C#. Well with the help with everyone I got it converted.
But I overlooked something and don't understand why it is doing this.
Below is my code, I would be greatfull if someone can guide me through
the right path or even help me solve this issue.
Problem: The old tool which was written in VB6 works perfect. But I
needed to convert this to C# using since there are new tools we are
creating that would like to leverage this style of security. The
problem is that the encryption method is not working as it should. The
decryption method works perfect. Just having problems with the
encryption part.
Test Values:
Current Encrypted Value - 0835262B27
Value returned using Decrypt method - anna
Current Decrypted Value - anna
Value returned using Encrypted method - 35262B27
*** As you can see the encryption method is returning something
different then the original encrypted value. *** PLEASE HELP !!! ***
CODE:
static byte[] ParseHex(string text)
{
byte[] ret = new byte[text.Length / 2];
for (int i = 0; i < ret.Length; i++)
{
ret[i] = Convert.ToByte(text.Substring(i * 2, 2), 16);
}
return ret;
}
public static string Decrypt("THEFELDGROUP", string encrypted)

This line does not compile. You probably should have written
something like:
public static string Decrypt(string password, string encrypted)
{
byte[] binary = ParseHex(encrypted);
char[] chars = new char[binary.Length];
for (int i = 0; i < chars.Length; i++)
{
chars[i] = (char)(binary[i] ^ password[i % password.Length]);
}
return new string(chars);
}
public static string Encrypt("THEFELDGROUP", string strG)

Again this line does not compile:
public static string Encrypt(string strPass, string strG)
{
char[] cHexDigits = {
'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
};
// the encoded integer value of the current character in the string
byte byteEncoded;
System.Text.StringBuilder sbReturned = new
System.Text.StringBuilder();
for (int i = 0; i < strG.Length; ++i)
{
// encode the current character
byteEncoded = (byte)(((int)strG[i]) ^ ((int)strPass[i %
strPass.Length]));
// output the Hex character value of the above encoded value
sbReturned.Append(cHexDigits[byteEncoded >>
4]).Append(cHexDigits[byteEncoded & 0xF]);
}
return sbReturned.ToString();
}

Your code does not have the "08" because you are encoding a four
character plaintext into a four byte (= 8 hex digits) cyphertext. I
suggest you have a close look at the VB original to see where the
initial "08" comes from, then you need to reproduce that in your C#
version. We do not have enough information here to see its origin.

Your encryption scheme, a stream cypher with a repeating key, is not
very secure. Good enough to deter casual observation but easily
breakable by anyone seriously interested. Repeating any part of the
keystream is a big weakness for any stream cypher.

rossum
This is the version I tweaked. Also be aware there were some broken
lines which I imagine will reappear. Manmit, can you post a link to
the original code or the original VB6 code? I still reckon it's
working as intended, the 08 isn't a bell, I misread the original
code. Can you try with your working code (the vb6 one I guess) and
see if it is always 08? You may have a bug in the VB6 that just
happens to have been obfuscated because it's consistent between
encrypt and decrypt.. Oops, just read the end of Rossum's post and
he's said everything I was about to :)
If you need backwards compatability with existing data, I'd consider
decrypting with your algorithm and then re-encrypting it with
something stronger. The enterprise library has a good encryption
block. You could knock up a batch decrypter in VB6 with the working
code, then a batch re-encrypter in dotnet. Back up your data first ;)
class Program
{
static void Main(string[] args)
{
Console.WriteLine(Encrypt("anna"));
Console.WriteLine(Decrypt("35262B27"));
//SocketTest t = new SocketTest();
//t.Connect("www.wu2.co.uk", 80);
}
static byte[] ParseHex(string text)
{
byte[] ret = new byte[text.Length / 2];
for (int i = 0; i < ret.Length; i++)
{
ret[i] = Convert.ToByte(text.Substring(i * 2,
2), 16);
}
return ret;
}

public static string Decrypt(string encrypted)
{
string password = "THEFELDGROUP";
byte[] binary = ParseHex(encrypted);
char[] chars = new char[binary.Length];
for (int i = 0; i < chars.Length; i++)
{
chars[i] = (char)(binary[i] ^ password[i %
password.Length]);
}
return new string(chars);
}

public static string Encrypt(string strG)
{
string strPass = "THEFELDGROUP";
char[] cHexDigits = {
'0', '1', '2', '3', '4', '5', '6',
'7',
'8', '9', 'A', 'B', 'C', 'D', 'E',
'F'
};

// the encoded integer value of the current character in
the string
byte byteEncoded;

System.Text.StringBuilder sbReturned = new
System.Text.StringBuilder();

for (int i = 0; i < strG.Length; ++i)
{
// encode the current character
byteEncoded = (byte)(((int)strG[i]) ^
((int)strPass[i % strPass.Length]));

// output the Hex character value of the above
encoded value
sbReturned.Append(cHexDigits[byteEncoded >>
4]).Append(cHexDigits[byteEncoded & 0xF]);
}

return sbReturned.ToString();
}
}
Apr 3 '07 #6
On Apr 3, 4:21 pm, "Freiddie" <fei.yua...@gmail.comwrote:
I agree. It's better to use more secure methods such as
System.Security.Cryptography. There is little space here to explain in
detail, but I can give you an example if you want.

Freiddiehttp://fei.yuanbw.googlepages.com/http://freiddy.blogspot.com/http://crazibe.blogspot.com/
I would have used the Cryptography class in .NET but as I said the
current cryptology that is being used was written in VB6 or so. And I
can not change the way the text is encrypted or decrypted becuase
there are applications written using the exisiting code. All I am
charge to do is convert it to an C# dll file so that future apps can
use the .NET version rather then the vb version.

Here is the original VB. version

Attribute VB_Name = "Module1"
Option Explicit
Dim pass$
Dim Strg$
Function decrypt(ByVal H$) As String
Dim i As Integer, J$
pass$ = "THEFELDGROUP"
'H$ = the buffered encrypted data
H$ = Mid$(H$, 3, Val(Left$(H$, 2)))
' debuffer it
Strg$ = ""
For i = 1 To Len(H$) Step 2
J$ = Mid$(H$, i, 2)
Strg$ = Strg$ + Chr$(Val("&H" + J$))
Next
'Strg$ now contains the encrypted string, which you can now
'decrypt.
Call Crypt(pass$, Strg$)
'strg$ now is decrypted
decrypt = Strg$
End Function
Function Crypt(pass$, Strg$)
Dim a, b
Dim i As Integer
a = 1
For i = 1 To Len(Strg$)
b = Asc(Mid$(pass$, a, 1)): a = a + 1: If a Len(pass$) Then a
=
1
Mid$(Strg$, i, 1) = Chr$(Asc(Mid$(Strg$, i, 1)) Xor b)
Next
End Function

Apr 3 '07 #7
On 3 Apr 2007 14:11:00 -0700, ma**********@gmail.com wrote:
>On Apr 3, 4:21 pm, "Freiddie" <fei.yua...@gmail.comwrote:
>I agree. It's better to use more secure methods such as
System.Security.Cryptography. There is little space here to explain in
detail, but I can give you an example if you want.

Freiddiehttp://fei.yuanbw.googlepages.com/http://freiddy.blogspot.com/http://crazibe.blogspot.com/

I would have used the Cryptography class in .NET but as I said the
current cryptology that is being used was written in VB6 or so. And I
can not change the way the text is encrypted or decrypted becuase
there are applications written using the exisiting code. All I am
charge to do is convert it to an C# dll file so that future apps can
use the .NET version rather then the vb version.

Here is the original VB. version

Attribute VB_Name = "Module1"
Option Explicit
Dim pass$
Dim Strg$
Function decrypt(ByVal H$) As String
Dim i As Integer, J$
pass$ = "THEFELDGROUP"
If you were using a stronger encryption, holding the key in plaintext
would be a weakness; but with your encryption scheme it does not make
the attacker's job that much easier.
>
' H$ = the buffered encrypted data
H$ = Mid$(H$, 3, Val(Left$(H$, 2)))
This is where your problem is. It is chopping off the first two
characters of the H$ parameter string, "Left$(H$, 2)", your extra
"08", and using them "Val(Left$(H$, 2))" to determine the length of
text to extract and decode: H$ = Mid$(H$, 3, Val("08"))
The first two characters appear to represent the length in decimal of
the following cyphertext.

You need to amend your C# Decrypt function to account for these two
characters:
Parse the first two characters as a decimal number.
Truncate the remaining cyphertext to that length
Decypher the truncated cyphertext

You also need to add these two characters to the start of any
encrypted string after you have converted it to Hex digits. Best to
check the VB original to see if there are any other things done that I
cannot determine here. For instance, what happens if the cyphertext
is more than 99 hex digits long?

rossum
>
' debuffer it
Strg$ = ""
For i = 1 To Len(H$) Step 2
J$ = Mid$(H$, i, 2)
Strg$ = Strg$ + Chr$(Val("&H" + J$))
Next

'Strg$ now contains the encrypted string, which you can now
'decrypt.

Call Crypt(pass$, Strg$)

'strg$ now is decrypted
decrypt = Strg$
End Function
Function Crypt(pass$, Strg$)
Dim a, b
Dim i As Integer
a = 1
For i = 1 To Len(Strg$)
b = Asc(Mid$(pass$, a, 1))
a = a + 1
If a Len(pass$) Then a = 1
Mid$(Strg$, i, 1) = Chr$(Asc(Mid$(Strg$, i, 1)) Xor b)
Next
End Function

Apr 3 '07 #8
On Apr 3, 6:36 pm, rossum <rossu...@coldmail.comwrote:
On 3 Apr 2007 14:11:00 -0700, manmit.wa...@gmail.com wrote:


On Apr 3, 4:21 pm, "Freiddie" <fei.yua...@gmail.comwrote:
I agree. It's better to use more secure methods such as
System.Security.Cryptography. There is little space here to explain in
detail, but I can give you an example if you want.
Freiddiehttp://fei.yuanbw.googlepages.com/http://freiddy.blogspot.com/http://...
I would have used the Cryptography class in .NET but as I said the
current cryptology that is being used was written in VB6 or so. And I
can not change the way the text is encrypted or decrypted becuase
there are applications written using the exisiting code. All I am
charge to do is convert it to an C# dll file so that future apps can
use the .NET version rather then the vb version.
Here is the original VB. version
Attribute VB_Name = "Module1"
Option Explicit
Dim pass$
Dim Strg$
Function decrypt(ByVal H$) As String
Dim i As Integer, J$
pass$ = "THEFELDGROUP"

If you were using a stronger encryption, holding the key in plaintext
would be a weakness; but with your encryption scheme it does not make
the attacker's job that much easier.
' H$ = the buffered encrypted data
H$ = Mid$(H$, 3, Val(Left$(H$, 2)))

This is where your problem is. It is chopping off the first two
characters of the H$ parameter string, "Left$(H$, 2)", your extra
"08", and using them "Val(Left$(H$, 2))" to determine the length of
text to extract and decode: H$ = Mid$(H$, 3, Val("08"))
The first two characters appear to represent the length in decimal of
the following cyphertext.

You need to amend your C# Decrypt function to account for these two
characters:
Parse the first two characters as a decimal number.
Truncate the remaining cyphertext to that length
Decypher the truncated cyphertext

You also need to add these two characters to the start of any
encrypted string after you have converted it to Hex digits. Best to
check the VB original to see if there are any other things done that I
cannot determine here. For instance, what happens if the cyphertext
is more than 99 hex digits long?

rossum


' debuffer it
Strg$ = ""
For i = 1 To Len(H$) Step 2
J$ = Mid$(H$, i, 2)
Strg$ = Strg$ + Chr$(Val("&H" + J$))
Next
'Strg$ now contains the encrypted string, which you can now
'decrypt.
Call Crypt(pass$, Strg$)
'strg$ now is decrypted
decrypt = Strg$
End Function
Function Crypt(pass$, Strg$)
Dim a, b
Dim i As Integer
a = 1
For i = 1 To Len(Strg$)
b = Asc(Mid$(pass$, a, 1))
a = a + 1
If a Len(pass$) Then a = 1
Mid$(Strg$, i, 1) = Chr$(Asc(Mid$(Strg$, i, 1)) Xor b)
Next
End Function- Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -
Thanks Rossum, I think I got the idea. Basically the first two
characters that are missing is a numerical value of the length of the
encrypted string. This should work. Let me try it and will keep you
updated.
Thanks again for the help.

Apr 4 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: D. Alvarado | last post by:
On my Fedora Core 2 Linux dev box, I have installed mcrypt and compiled PHP with the --with-mcrypt option. I am concerned that when I move to another hosting enviornment mcrypt will not be...
1
by: Jase H | last post by:
Hello, I have a ASP.NET web application problem involving the data encryption and decryption assembly(DLL) used on the connection string value that is set in the webconfig file. The problem...
3
by: Mike | last post by:
Hi, I have been experimenting with the RijndaelManaged Cryptography class in C# and have stumbled upon a "peculiarity". Following code is standalone Console App that demonstrates using...
2
by: almurph | last post by:
Hi everyone, Can you help me please? I am having a problem with the encryption/decryption of words with the Irish fada in them. The Irish fada is like this: áéíóú/ÁÉÍÓÚ. It's kind of like the...
2
by: tfoxusenet | last post by:
Hi, I need to encrypt/decrypt some data for my C# application that can also be read on a unix system, and need a quick, simple, cross-platform solution I can embed in my own code that doesn't...
3
by: Mythran | last post by:
I have googled and tested and tried and still I can't seem to implement a simple encryption/decryption console application. My goal is to create two methods. public byte Encrypt(string...
1
by: ppuniversal | last post by:
Hello, I am making a DES encryption/decryption program using OpenSSL library. I am using function des_ecb_encrypt(des_cblock *input, des_cblock *output, des_cblock *keysched, int mode); ...
0
by: Dipanwita | last post by:
I have written a RSA encryption/decryption function in c using the formula a = b^c %n. For solving the equation I have used Squaring and multiplying method for modulo exponentiation . These...
3
by: =?Utf-8?B?TG9yZW4=?= | last post by:
I’m trying to encrypt and decrypt a file in vb.net. I am using the TripleDESCryptoServiceProvider encryption found in System.Security.Cryptography. Below is the code for my Encrypt and Decrypt...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.