This is pretty basic computer science stuff here. Converting between data types and bases. Since you appear to want to use bignums though the best we can give you is pseudo code for languages like C#or Java.
The implementation details of bignum which likely converts the byte array first into an int array for efficient computation are another question altogether. Though implementing a bignum library from scratch is not too difficult and a good learning experience.
So the byte array practically speaking is useless. You need division and modulo by 34 so no tricks there. Now base 32 as a power of 2 would be a different story. In conclusion get or make a bignum library, convert your byte array, and to be efficient make a diagram function and loop on it as you do the conversion. Gor decoding same thing just multiply by 34 and add.
|