Re: code cracking or how do you know you've got the correct key?
From: Douglas A. Gwyn (DAGwyn_at_null.net)
Date: 12/29/04
- Next message: Douglas A. Gwyn: "Re: code cracking or how do you know you've got the correct key?"
- Previous message: Paul Rubin: "Re: [Lit.] Buffer overruns"
- In reply to: Bob Harris: "Re: code cracking or how do you know you've got the correct key?"
- Next in thread: Phil Carmody: "Re: code cracking or how do you know you've got the correct key?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 29 Dec 2004 11:55:37 -0600
Bob Harris wrote:
> Gregory G Rose wrote:
>>... ints must be bigger than one byte. ...
> Is that in the standard C definition? I used C compilers 15-20 years ago in
> which ints were 8 bits. Are there not still small micros around with a
> natural word size of 8 bits, and in which an int would naturally be a byte?
The C standard requires that type int have a width of
at least 16 bits. It is misleading to use the term
"byte" in this discussion, as in the C standard a
byte is the basic unit of allocation and could be
wider than 8 bits, indeed a byte could be as wide
as an int. A better term would be "octet".
If a purported C implementation uses only 8 bits in
its int representation, it doesn't conform to the
standard (nor to the expectation of portable code).
There really is no purpose served by such an
implementation choice, since if the program really
wants a narrow integer type, that is available as
type (signed or unsigned) char. Also, as of C99 the
<stdint.h> facilities are standard (and can readily
be provided for pre-C99 implementations).
- Next message: Douglas A. Gwyn: "Re: code cracking or how do you know you've got the correct key?"
- Previous message: Paul Rubin: "Re: [Lit.] Buffer overruns"
- In reply to: Bob Harris: "Re: code cracking or how do you know you've got the correct key?"
- Next in thread: Phil Carmody: "Re: code cracking or how do you know you've got the correct key?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|