Good mornig,
the problem is that i'm dealing with the extended ASCII code, 8 bits, 'cause
I need characters as à è ò ù and so on. Do you know if there is a function I
can use for I\O of which I can handle this situation? I can't find the
definition of getc, I've checked STDIO.H.
I use char c=getc(file)
Could you give me some suggestions?Obviously I can't add a massive overhead
to the message.To solve this problem I could use 7 bits Ascii but I must use
the accented chars.Maybe I could print the char to the file as int but it
would do a big overhead!!!
Thanks for your time ,best regards!

----- Original Message -----
From: "Richard Levitte - VMS Whacker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Monday, June 28, 2004 6:00 PM
Subject: Re: OT: problems with crypto and ASCII


> In message <[EMAIL PROTECTED]> on Mon, 28 Jun 2004
17:45:23 +0200, <[EMAIL PROTECTED]> said:
>
> deck80> Hi everybody...sorry if it's not a question strictly involving
> deck80> openssl but I hope someone can help me.
> deck80> I'm writing a simple program that encode a file with a LFSR
> deck80> and a clock controlled  shift register. Basically there is a
> deck80> char m, I create a char of "worms" x and I make cipher c=m^x
> deck80> in output. The problem is that the output can be every kind of
> deck80> 256-ASCII code so also one of the first 31. So when it reads
> deck80> the encoded file it reads also the special chars.It seems it
> deck80> stops when it finds the char "
> deck80> ÿ
> deck80>
> deck80> " which is probably the end of file. So the output is usually
> deck80> a little part of the input. How can I do to solve this? I've
> deck80> tried to read the file char by char and also without the
> deck80> control if I'm reading an EOF
> deck80> while(c=getchar(ifile)/*!=EOF*/)
> deck80> {...
> deck80> }
> deck80>  but it understands the file is finished this way either.
> deck80> I've tried to append 10 EOF at the end, trying to recognize it
> deck80> as a different EOF sequence but it doesn't work.
> deck80> I could try to use a sequence of 10 zeros before the end but
> deck80> it doesn't seem to be a smart solution(as the former with the
> deck80> 10 EOF;))
>
> What is the type of c?  If it's a 'char', try changing it to 'int'.
>
> This is really a C language question :-).
>
> -----
> Please consider sponsoring my work on free software.
> See http://www.free.lp.se/sponsoring.html for details.
>
> --
> Richard Levitte   \ Tunnlandsvägen 52 \ [EMAIL PROTECTED]
> [EMAIL PROTECTED]  \ S-168 36  BROMMA  \ T: +46-708-26 53 44
>                     \      SWEDEN       \
> Procurator Odiosus Ex Infernis                -- [EMAIL PROTECTED]
> Member of the OpenSSL development team: http://www.openssl.org/
>
> Unsolicited commercial email is subject to an archival fee of $400.
> See <http://www.stacken.kth.se/~levitte/mail/> for more info.
> ______________________________________________________________________
> OpenSSL Project                                 http://www.openssl.org
> User Support Mailing List                    [EMAIL PROTECTED]
> Automated List Manager                           [EMAIL PROTECTED]
>


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to