From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9dec3ff1604723d9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!proxad.net!news.cs.univ-paris8.fr!news.zanker.org!newsfeed00.sul.t-online.de!t-online.de!inka.de!rz.uni-karlsruhe.de!news.uni-stuttgart.de!carbon.eu.sun.com!btnet-feed5!btnet!news.btopenworld.com!not-for-mail From: "Martin Dowie" Newsgroups: comp.lang.ada Subject: Re: Bitmanipulation in Ada Date: Thu, 19 Aug 2004 18:09:23 +0000 (UTC) Organization: BT Openworld Message-ID: References: <87k6vwrwym.fsf@insalien.org> NNTP-Posting-Host: host81-154-184-237.range81-154.btcentralplus.com X-Trace: titan.btinternet.com 1092938963 13760 81.154.184.237 (19 Aug 2004 18:09:23 GMT) X-Complaints-To: news-complaints@lists.btinternet.com NNTP-Posting-Date: Thu, 19 Aug 2004 18:09:23 +0000 (UTC) X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MSMail-Priority: Normal X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Xref: g2news1.google.com comp.lang.ada:2866 Date: 2004-08-19T18:09:23+00:00 List-Id: Bernd Specht wrote: > Always? What do you think about bitscrambling software which has to > treat data alternating as bitvector and as integer value in a loop > like this (not exeactly this for securitity reasons): > > ... > loop > declare > x : boolean; > begin > x := b(k); > b(k) := b(32 - k); > b (32 - k) := x; > I := I * prime1 mod prime2; > end; > end loop; > > > Can you find an equivalent algorithm where you can separate the > bit-ops and the integer-ops? Sorry, I'm missing something... Are "I" and "b" different views of the same address space?