xxtea / xxtea-dart Goto Github PK
View Code? Open in Web Editor NEWXXTEA encryption algorithm library for Dart.
License: MIT License
XXTEA encryption algorithm library for Dart.
License: MIT License
I am trying to get the same result as the below:
https://www.movable-type.co.uk/scripts/tea-block.html
How do I do it?
Thanks for your plugin that I use as a way to encode a database as an example in sembast.
After some tests, I found that indeed xxtea gives different results on debug and release!
xxtea.encryptToString('value', 'test')
When used in current Flutter stable, it gives NMvXe7aiJfgaFlsx
on debug and something different (randomly) on release (but that could be possible in some encryption algorithm but I think not here). But it also cannot decrypt the debug value:
xxtea.decryptToString('NMvXe7aiJfgaFlsx', 'test')
gives something different each time ('Falue', '\nalue'...) where the first letter is messed up.
According to a user, it was working fine on Flutter 1.2.1.
In the readme.md you are comparing encrypted data with original data. You would rather compare original data with decrypted data. It makes more sense than the alternative.
import 'package:xxtea/xxtea.dart';
String str = "Hello World! 你好,**🇨🇳!";
String key = "1234567890";
String encrypt_data = xxtea.encryptToString(str, key);
String decrypt_data = xxtea.decryptToString(encrypt_data, key);
print(str == encrypt_data)
The pub.dev page is currently outdated compared the version in this repository.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.