开发者

TEA Encryption with C#

开发者 https://www.devze.com 2023-01-29 07:16 出处:网络
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 r

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号