Support

If you have a problem or need to report a bug please email : support@dsprobotics.com

There are 3 sections to this support area:

DOWNLOADS: access to product manuals, support files and drivers

HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects

USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here

NEW REGISTRATIONS - please contact us if you wish to register on the forum

Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright

simple encryption system

For general discussion related FlowStone

simple encryption system

Postby tester » Sat Nov 02, 2013 2:29 pm

I'm looking for a simple encryption system for text data (letters, numbers, other characters, newline marks). I just need to convert some sort of "preset/project file" (i.e. text file, not used by preset manager - just loaded externally) into something not readable, and then back again. The only goal is to prevent user from accidental visual access to the content within that text file. Encrypted - would be meaningless enough.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: simple encryption system

Postby Tronic » Sat Nov 02, 2013 2:34 pm

base64, with some remix of string, should be good?
Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: simple encryption system

Postby tester » Sat Nov 02, 2013 2:47 pm

Anything that works correctly when converting back and forth, anything that makes the text meaningless if you open the text file, anything that works fast. Project files are small, few kB.

It should work correctly with multi-line texts; I noticed in some earlier posts, that there are some confusions on "end line" markings, depending on OS (and system settings?). The project itself uses green prims and ruby modules, so it could cause some problems.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: simple encryption system

Postby Tronic » Sat Nov 02, 2013 3:03 pm

the base 64, is not os dipendant.
Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: simple encryption system

Postby tester » Sat Nov 02, 2013 3:09 pm

If it's os independent, then it should be fine. As I mentioned - there is no big requirement for this encryption part.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: simple encryption system

Postby trogluddite » Sat Nov 02, 2013 3:19 pm

The CIA or a good hacker could crack this in a few minutes, but if you just want to obfuscate things enough to deter a casual onlooker, here's a quick encrypt/decrypt module...
Simple Encoder.fsm
(1.53 KiB) Downloaded 890 times

Note that I haven't tested this when saving/loading the files, but values stay within the 8-bit ASCII range, so there shouldn't be a problem.
It also assumes that all input characters are "standard" ASCII - i.e. with codes within the 0-127 range, and no special "extended" characters. Again, that should be fine for regular text strings and numerals.
Encoding and decoding use exactly the same module with matching code key integers.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: simple encryption system

Postby tester » Sat Nov 02, 2013 3:28 pm

I use only letters (but will it work with non-english letters? we have a lot of ą, ę, ś, ż, and others, but different hanguages may have their own too), numbers, and some characters as a separators (,/\^| and few others).
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Re: simple encryption system

Postby trogluddite » Sat Nov 02, 2013 4:39 pm

All of the separator characters should be OK, but at the moment, it won't work for non-english characters as they are outside the ASCII range.
Having said that, I'm not sure even how regular "green" strings would handle non-ASCII characters - it requires support for Unicode ("UTF"), which allows character codes longer than one byte. Ruby does have support for UTF, but whether it would interface well with "green", I do not know. The default encoding in Ruby is definitely just ASCII - presumably for compatibility with green strings.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: simple encryption system

Postby Tronic » Sat Nov 02, 2013 6:13 pm

the title is simple encryption system, and the base64 + mixin-string has all you need.
and support also the Unicode Char.
Tronic
 
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: simple encryption system

Postby tester » Sat Nov 02, 2013 6:45 pm

trogluddite wrote:All of the separator characters should be OK, but at the moment, it won't work for non-english characters as they are outside the ASCII range.
Having said that, I'm not sure even how regular "green" strings would handle non-ASCII characters - it requires support for Unicode ("UTF"), which allows character codes longer than one byte. Ruby does have support for UTF, but whether it would interface well with "green", I do not know. The default encoding in Ruby is definitely just ASCII - presumably for compatibility with green strings.


@Trog. To my surprise - both, green processing and ruby seem to work fine with our characters (it's based on Central European, either Windows 1250 or ISO-8859-2 coding). I'm using external text files, and have all language specific letters. But display may depend on operating system (enabled encodings). So it seems to be "pass through" situation.

@Tronic. Okay, where can i find it?
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
tester
 
Posts: 1786
Joined: Wed Jan 18, 2012 10:52 pm
Location: Poland, internet

Next

Return to General

Who is online

Users browsing this forum: No registered users and 66 guests