Click here to Skip to main content
11,932,780 members (50,192 online)
Rate this:
Please Sign up or sign in to vote.
Hi everyone,

I have a file with a Base64 string that i have to decode into numbers, and i don't know how to do this in C#.

I know how to convert to binary,using Convert.FromBase64String. However i've got to obtain numbers like coordenates X/Y to plot this into a graph, because this is a ECG signal.


Hope you can help me, thanks
Posted 10-Jul-13 7:09am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


Look for *Base64* methods of this class.

CDCC8 10-Jul-13 12:28pm
Further Information: I know this data is 16bits Signed.

I've already used Convert.FromBase64String but all i get is strang characters in the command line

here's my code:

public static string Decode(string stringEncoded)
// Converte a String em Base64 em Array de Bytes.
byte[] encodedDataAsBytes = System.Convert.FromBase64String(stringEncoded);

// Retorna a String decodificada.
return UnicodeEncoding.Default.GetString(encodedDataAsBytes);
CDCC8 10-Jul-13 12:36pm
Can you give me other suggestions?
Sergey Alexandrovich Kryukov 10-Jul-13 14:25pm
I answered your question, that's it. Everything else is absolutely uncertain.

When you say "this data is 16-bit signed", it's next to saying nothing, because signing is not reversable (you can only read signed data or only write encrypted data when you have a public key), and, in all case, you need to know exact version of encryption algorithm and one or both keys, depending on what you need. Public-key encryption is meant to be unbreakable, don't even try. As a matter of fact, I doubt that anything could be "16-bit signed": people don't use just 16 bits for signing, usually it's 1K or more. It could be something else. What? You don't give any information on it.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web04 | 2.8.151126.1 | Last Updated 10 Jul 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100