Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » [REPLACED by Cypher package]StreamCypher - A package for stream data cryptography
Re: [REPLACED by Cypher package]StreamCypher - A package for stream data cryptography [message #58346 is a reply to message #58333] Wed, 04 May 2022 12:42 Go to previous messageGo to previous message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
They're simmetric encoders/decoders.
If you apply 2 times you get original text.

// key must be 16 or 32 bit... here a sample 16 bit key
key = "\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10";

// create encoder
Snow2 snow(key):

// encode text
String s "Some text to encode";
String encoded = snow(s);

// reset encoder/decoder
snow.SetKey(key);

// decode text
String decoded = snow(encoded);


Ciao

Massimo
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Error with MessageCtrl when using "["
Next Topic: Uniq : single instance applications made easy
Goto Forum:
  


Current Time: Sun Apr 28 11:49:36 CEST 2024

Total time taken to generate the page: 0.04217 seconds