tags:

views:

96

answers:

1

The beginners guide for oauth says the following:

Binary data is not directly handled by the OAuth specification but is assumed to be stored in an 8bit array which is not UTF-8 encoded.

I don't understand what is meant by this? How do you store binary in an 8bit array? The wikipedia article on bit array didn't help me.

+2  A: 

8-bit array most likely means an array with byte-sized elements or, an array of bytes. Where a byte consists of 8-bits, or one octet. The data region that the array encompasses is then said to be byte-addressable.

Andy
So how do I take binary data and turn it into an array of bytes?
apphacker
Binary data _is_ an array of bytes
snowcrash09
oh so by array of bytes they mean an array of 8 bit memory addresses?
apphacker
no, they mean the address of a series of bytes, also called, the address of a byte array - arrays are passed by-reference as arguments to functions.
Andy
Arrays are defined by three attributes: 1. address of the first byte of the contiguous region of memory that encompasses the array, 2. the size of each element in the array, 3. the number of elements in the array. In this case: 2. = 8-bits (one byte)
Andy
... generally, in C-like languages with contiguous, index-addressable arrays
Andy