Link to home
Start Free TrialLog in
Avatar of robjgreen
robjgreen

asked on

File Encryption?

Hi Everyone,

I need a encryption routine to encrypt and decrypt files on command, but I have no idea where to start, any ideas?

Kind Regards,
Rob Green.
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of HMWT
HMWT

So to use this function I might use
dim cript as byte,encripted$
cript=int(rnd*255)
'to encripe
encripted$=Cipher("this will be incripted",cript)
' to decript
Print Cipher(encripted$,(255 xor cript))

'this should return:"this will be incripted" corect?
---Have Mouse Will Travel
You can use it this way but how will you decrypt it if you generate your mask randomly.

I often use this function like this. I start with a base mask (lets say 50). Then for each line I add to a file I add one. When I call the function, it looks like:

dim encrypted$ as string
dim bytLine as byte
const kMask as byte = 50
encrypted$ = (Cipher("this will be encrypted",kBase+bytLine))
bytline = bytline + 1

Avatar of robjgreen

ASKER

You are both confusing me. I'll evaluate the answer soon.