Deutsch English Français Italiano |
<41c2930d8ad16c2b1ecf5263b0dd2ee8$1@sybershock.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!weretis.net!feeder9.news.weretis.net!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: SugarBug <3883@sugar.bug> Newsgroups: sci.crypt Subject: Efficient dword bitwise rotate / circular shift using Bash shell ? Date: Sat, 4 May 2024 09:24:12 -0500 Organization: Baggy Jeans Mafia (sybershock.com) Message-ID: <41c2930d8ad16c2b1ecf5263b0dd2ee8$1@sybershock.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Injection-Info: i2pn2.org; logging-data="63733"; mail-complaints-to="usenet@i2pn2.org"; posting-account="yZybWhCr+jI4C3MuGpPde+DhCwsjQrVZrsCOigcx7fM"; X-Spam-Checker-Version: SpamAssassin 4.0.0 Bytes: 991 Lines: 10 Example: rol() { num="$@" ; pre=$((num<<13)) ; suf=$((num>>19)) ; num=$((pre^suf)) ; num=$((num&0xffffffff)) ; echo "$num" ; } What tricks will make this more efficient in Bash? -- www.sybershock.com | sci.crypt | alt.sources.crypto | alt.lite.bulb