Encrypt Decrypt
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Encrypt Decrypt
I've seen some examples of using Encrypt and Decrypt for text and data in fields, but have not seen/found anything about Encrypting whole binary files. Anyone have a code example?
Hi Keyless,
Just read the binary file, put its content into a variable, and encrypt the variable instead of a field. It works exactly the same as the example with the fields.
Best,
Mark
Just read the binary file, put its content into a variable, and encrypt the variable instead of a field. It works exactly the same as the example with the fields.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Dear Keyless,
How big is big? I've never had any problems encrypting photos of a few megabytes large.
I don't know what "actual OpenSSL programme" you are using, but if you refer to openssl.org, then I can tell you that both OpenSSL and Revolution depend on the same SSLeay, which means that there should hardly be any speed difference.
Best,
Mark
How big is big? I've never had any problems encrypting photos of a few megabytes large.
I don't know what "actual OpenSSL programme" you are using, but if you refer to openssl.org, then I can tell you that both OpenSSL and Revolution depend on the same SSLeay, which means that there should hardly be any speed difference.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
I'm talking about DV video files which average about 600megs.Mark wrote:Dear Keyless,
How big is big? I've never had any problems encrypting photos of a few megabytes large.
I don't know what "actual OpenSSL programme" you are using, but if you refer to openssl.org, then I can tell you that both OpenSSL and Revolution depend on the same SSLeay, which means that there should hardly be any speed difference.
Best,
Mark
...I'm refering to the OpenSSL command-line executable. I also think it can be done like that with the dll, but the rev implimentation seems to need you to read the file into rev first then encrypt, then write it to a file.
Hi Keyless,
Why don't you set up a streaming server with password authentication?
I don't think it makes sense to encrypt an entire 600MB video. Ultimately, it will be decrypted and could be recorded again. Do you know how easy it is to record a computer screen onto a DVD or video recorder?
Best,
Mark
Why don't you set up a streaming server with password authentication?
I don't think it makes sense to encrypt an entire 600MB video. Ultimately, it will be decrypted and could be recorded again. Do you know how easy it is to record a computer screen onto a DVD or video recorder?
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Mark, they want it encrypted for secure storage and transfer, they are not looking to make them playable on the web or server or anything. When it is encrypted you can't play it so, it would not be possible for a screen recording.Mark wrote:Hi Keyless,
Why don't you set up a streaming server with password authentication?
I don't think it makes sense to encrypt an entire 600MB video. Ultimately, it will be decrypted and could be recorded again. Do you know how easy it is to record a computer screen onto a DVD or video recorder?
Best,
Mark
I makes perfect sense to encrypt it, if you don't want someone to view it.
You didn't say what it was for, keyless. Now, I can understand why a streaming server is not what you are looking for.
Are you going to use the OpenSSL command line utility, or are you still looking for a Rev-only solution?
Mark
Are you going to use the OpenSSL command line utility, or are you still looking for a Rev-only solution?
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Looking for a rev only solution. OpenSSL command line works fine but I'd rather not have to pass the password/keyphrase to the command line. Doesn't seem as secure as a pass to a DLL.Mark wrote:You didn't say what it was for, keyless. Now, I can understand why a streaming server is not what you are looking for.
Are you going to use the OpenSSL command line utility, or are you still looking for a Rev-only solution?
Mark
Hi Keyless,
You could repeatedly read a small chunk of the movie file, encrypt this and encode it with base64encode before writing it to the destination file. Make sure to use a special item delimiter, which is not used by base64encode, between the chunks. You can experiment with chunk sizes to obtain the highest speed.
Best,
Mark
You could repeatedly read a small chunk of the movie file, encrypt this and encode it with base64encode before writing it to the destination file. Make sure to use a special item delimiter, which is not used by base64encode, between the chunks. You can experiment with chunk sizes to obtain the highest speed.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Thats an pretty good idea.Mark wrote:Hi Keyless,
You could repeatedly read a small chunk of the movie file, encrypt this and encode it with base64encode before writing it to the destination file. Make sure to use a special item delimiter, which is not used by base64encode, between the chunks. You can experiment with chunk sizes to obtain the highest speed.
Best,
Mark
I've finished the program though with a command line Blowfish encryptor I found. For the final production we are going to have a DLL made.
I do like your idea though, and will do some testing with it, might come in handy, Thanks Mark.
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Contact:
You could always file an enhancement request at http://quality.runrev.com and ask the Rev team to expose more OpenSSL functions.
Explain what you would like to see extra and give them a compelling business case. Or contact them directly to see how much it would cost to extend if you really need it but it doesn't fit in with their current strategic plan.
Jan Schenkel.
Explain what you would like to see extra and give them a compelling business case. Or contact them directly to see how much it would cost to extend if you really need it but it doesn't fit in with their current strategic plan.
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com