Sujet : Efficient dword bitwise rotate / circular shift using Bash shell ?
De : 3883 (at) *nospam* sugar.bug (SugarBug)
Groupes : sci.cryptDate : 04. May 2024, 15:24:12
Autres entêtes
Organisation : Baggy Jeans Mafia (sybershock.com)
Message-ID : <41c2930d8ad16c2b1ecf5263b0dd2ee8$1@sybershock.com>
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