开发者

block TEA in c#

开发者 https://www.devze.com 2022-12-14 14:53 出处:网络
Using block tea (XXTEA), how can I convert encrypted text into human readable form? strin开发者_高级运维g encryptedText = \"ASDFSDAFSADFSDFSDFSDAF\"; (assume it is in correct format)

Using block tea (XXTEA), how can I convert encrypted text into human readable form?

strin开发者_高级运维g encryptedText = "ASDFSDAFSADFSDFSDFSDAF"; (assume it is in correct format)

I have the key/pwd also.


There is a Visual Basic implementation of the block tea algorithm here:

http://www.blog-dotnet.com/post/Tiny-Encryption-Algorithm-(TEA)-in-Visual-BasicNET.aspx

Block tea is meant to be easily implementable, so you shouldn't have a hard time converting that to C# (or compiling it into a .NET assembly with VB and then referencing it from .NET).

You should use the above as a base and then modify it as per the XXTEA algorithm, found here:

http://en.wikipedia.org/wiki/XXTEA

Again, it's meant as being easy to implement, so you shouldn't be too hard. If there are specific parts you are having issues with, please make sure to follow up.


Edit1: Core XTEA algorithm in C# with other parts in VB.NET at CodeProject

Tiny Encryption Algorithm and XTEA for the Compact Framework at CodeProject

Here is a JavaScript Implementation of the XXTEA algorithm and here.

Here is a Pascal implementation of all of them.

With all the other answers you should be able to put an implementation together. Once you do it, make a blog or report back here so it is recorded for the next guy!


I found this https://github.com/WooCode/xxTea which is a C# implementation, with unit tests provided. I haven't verified it's accuracy.

0

精彩评论

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