Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MrMick - Decoding Base64 files!!

Posted on 1998-04-03
6
Medium Priority
?
200 Views
Last Modified: 2012-06-21
Hi there,

MrMick very kindly answered a question of mine a few day ago and provided me with a routine to encode a file into base64.  I've used this routine and it works fine but would now like the ability in my app to decode these files as well.

Has anyone got a VB sub that will do this?

Thanks

Pete
0
Comment
Question by:peterwest
  • 3
  • 2
6 Comments
 
LVL 6

Expert Comment

by:clifABB
ID: 1460287
Most encryption routines will decrypt if the encrypted object is run through the encryption again.
0
 
LVL 6

Expert Comment

by:clifABB
ID: 1460288
Make a backup of the file first!
0
 
LVL 2

Author Comment

by:peterwest
ID: 1460289
I don't think Base64 will decrypt the file by running it through again!!!  I've already tried that and it didn't work.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 2

Accepted Solution

by:
sbmc earned 150 total points
ID: 1460290
Base64 encoding works in chunks of three bytes converted to four bytes. Decoding works by grabbing 4 byte chunks and converting these 4 bytes into 3 bytes as follows:
   1. grab 4 bytes
   2. convert to binary ie 32 bits
   3. remove 1st 2 bits of every byte
   4. divide the resulting 24 bits into 3 8bit chunks
   5. convert each 8 bit string into a byte
   6. repeat 1-6 for each group of 4 byte strings in your file

0
 
LVL 2

Author Comment

by:peterwest
ID: 1460291
Thanks,

I've already got the necessary routine to decode Base64 but it is useful to understand how it works - maybe i'll even write my own routine as the one i'm using at the moment is a little convoluted and inefficient (or at least it would appear so).

Pete

0
 
LVL 2

Author Comment

by:peterwest
ID: 1460292
Thanks,

I've already got the necessary routine to decode Base64 but it is useful to understand how it works - maybe i'll even write my own routine as the one i'm using at the moment is a little convoluted and inefficient (or at least it would appear so).

Pete

0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question