6

I am currently looking at a TIFF file generated by a microscope vendor. They store an XML within the TIFF (ImageDescription tag). Within this XML I can find a <barcode> element. But instead of storing the actual barcode (PDF417, DataMatrix) value, they store something else.

I have three samples, first one is a PDF417, the last two are DataMatrix. Decoding the values leads to:

  1. 04050629C
  2. H13150154711A11
  3. H13150154512A02

while the XML element <barcode> contains (in that order):

  1. MDQwNTA2MjlD
  2. SDEzMTUwMTU0NzExQTEx
  3. SDEzMTUwMTU0NTEyQTAy

What type of encoding is this ?

1 Answer 1

7

The type of encoding is Base64 encoding.

$ echo MDQwNTA2MjlD | base64 -d
04050629C

$ echo SDEzMTUwMTU0NzExQTEx | base64 -d
H13150154711A11
2
  • Try to elaborate a bit (or just drop a comment).
    – perror
    Commented Oct 24, 2013 at 8:49
  • Genius ! $ echo MDQwNTA2MjlD | base64 --decode -> 04050629C
    – tibar
    Commented Oct 24, 2013 at 8:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.