Results 1 to 2 of 2

Thread: Base64String

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Feb 2003
    Location
    C:\Windows\Microsoft.NET\Framework
    Posts
    574

    Base64String

    How does one represent values in base-64 strings? Actually, the question is, what is the process of converting numerals from other bases to base 64 -- without using any library functions in any programming environment like .NET's Convert.ToString(byte[], int base) or Convert.ToBase64String? How does one do it on paper?

    Going by the name, and the sparse documentation, I guess it is a system of representing numeral values where the logarithmic base is the number 64.

    I pondered, like the binary system is base 2, it has two value representations -- 0 and 1. The decimal, base 10, has 10 value representations - 0 to 9. These we know of as digits of that system. In the base 64 system, the value representations, or digits, would then be 0 to 63. Wait a minute! But anything 10 or upward is already two digits. OK, that is so because I am representing them in base 10. So, the question is: what is that sample set of tokens which form the digits of base 64?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Base64String

    Hexadecimal uses 0-9 and A-F as digits. Base64 is like that. Here's a quote from the help topic for the Convert.ToBase64String method:
    The base 64 digits in ascending order from zero are the uppercase characters 'A' to 'Z', the lowercase characters 'a' to 'z', the numerals '0' to '9', and the symbols '+' and '/'. The valueless character, '=', is used for trailing padding.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width