Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I have noticed something about base64 and the number for each file is not the same length like md5 sha1 sha512 and was wondering why or if there are different types of base64


One example of the base64 code I am interested in:

Gyt7rmUcoMHxLPcV8qJliPMciP0aXZ/nsK+Gf0gtwVs


So once more what kind of base64 is this if there is more than one kind and how might I encode a files base64 to make it in this format?


the code Im currently using to encode base64 is:

Public Function ConvertToBase64(ByVal Input As String)
Return Convert.ToBase64String(System.Text.ASCIIEncoding.ASCII.GetBytes(Input))
End Function
Posted

1 solution

The Base64 encoding has nothing to do with MD5, SHA1 or SHA512. You can encode the result of hash function of course, but you don't show any code which could be a problem.

One line in your code can create a problem though. This is using System.Text.ASCIIEncoding.ASCII. This encoding does not support Unicode which is used by .NET (and all more or less modern software). You loose string data, in general case. I would recommend using System.Text.UTF8Encoding in all cases.

—SA
 
Share this answer
 
Comments
Dale 2012 5-May-11 21:24pm    
is this a form of base64?
Gyt7rmUcoMHxLPcV8qJliPMciP0aXZ/nsK+Gf0gtwVs

What do you make of it?
Sergey Alexandrovich Kryukov 5-May-11 22:57pm    
It is impossible to know in principle based just on this string. It can be anything. Decode it back to array of byte to see what is that. You get it somewhere, how come you don't know?
--SA
Dale 2012 6-May-11 3:25am    
I have bumped into thousands of these strings in text files within a folder named base64 but am having trouble figuring out what it is.


Here are some more examples in full

Pv6iN8JTRlz2L0rlqhRVI8cOyxNSrdna2PRaqE4TNAc=AdWare.Win32.Xupiter.k
bfztyae7Jv1Pz9Qd1GODb7XqcfDKNlfVeKrQdq9XLYQ=AdWare.Win32.CaptainCode.a
yEMNNBX2glNJhMDm+ze/h/3MsJJBrQ+dLfAe75b73kY=Porn-Dialer.Win32.Small.e
6VWvwiuDwrHurqCMMlAKb2k74HULXoa/CcLNOMZnz4g=Porn-Dialer.Win32.DialWeb
2/wuje+314Qumcz9nMM/lftkmzN1wAZ+q7+SgUZQg6A=AdWare.Win32.Lop
DTDL0GlJwkSSq/2a5TbRkHG7UMhmsUqUAMzZI881/kg=Porn-Dialer.Win32.ALifeDialer

Its seems to be virus definitions and if I can figure out what kind of signature it is I will be able to add them to my database for detection purposes.
Sergey Alexandrovich Kryukov 6-May-11 9:08am    
I just tried to answer:
http://www.codeproject.com/Answers/192439/What-Kind-Of-Encoded-string-Is-This.aspx
--SA

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900