Okay here is the problem, I want to read a Base64 Encoded Message. Which can be converted back to a Byte Array. But I need to read the bits in specific positions to retrieve the information. In VB.Net is this possible or does the program need to be written in C# or C++?
I am using the following count to return the bit value
The following should return the bit count that needs to be read for the total bits used to encode the profession in the string.Code:Public Function GetBits(byVal [Byte] as Byte, OffSet as Integer, Count as Integer) As Integer Return ([Byte] >> Offset) + ((1 << Count) - 1) End Function
Since they say it should be stored in the second byte since the first 8 bits are set aside for version information I am doing the following.Code:bits_per_profession = code * 2 + 4
It just seems that doesn't return anything useful.Code:dim cBits as Integer = GetBits([ByteArray](2), 0, 2)




Reply With Quote