TEA Encryption with C#
I'm trying to work with a TEA encryption algorithm developed using VB.NET (the only .NET implementation I found) in a C# project and get an exception (System.OverflowException: Arithmetic operation resulted in an overflow)
So I wondered if there is some C# implementation for TEA (couldn't find any).
The encoding/decoding is on QueryString parameters - so it should be used on strings and not Ints.
Any help would be appreciated.
Thank开发者_如何学JAVAs.
The article you provided actually links to a C# CodeProject article that the TEA implementation came from: http://www.codeproject.com/Articles/6137/Tiny-Encryption-Algorithm-TEA-for-the-Compact-Fram
If you're still having issues, could you post your source?
You need to put the code into an unchecked block to suppress the overflow exceptions (and just let the operations overflow as they would in C and Java).
精彩评论