Packagecom.adobe.utils
Classpublic class IntUtil

Contains reusable methods for operations pertaining to int values.



Public Methods
 MethodDefined by
  
rol(x:int, n:int):int
[static] Rotates x left n bits
IntUtil
  
ror(x:int, n:int):uint
[static] Rotates x right n bits
IntUtil
  
toHex(n:int, bigEndian:Boolean = false):String
[static] Outputs the hex value of a int, allowing the developer to specify the endinaness in the process.
IntUtil
Method detail
rol()method
public static function rol(x:int, n:int):int

Rotates x left n bits

Parameters
x:int
 
n:int

Returns
int
ror()method 
public static function ror(x:int, n:int):uint

Rotates x right n bits

Parameters
x:int
 
n:int

Returns
uint
toHex()method 
public static function toHex(n:int, bigEndian:Boolean = false):String

Outputs the hex value of a int, allowing the developer to specify the endinaness in the process. Hex output is lowercase.

Parameters
n:int — The int value to output as hex
 
bigEndian:Boolean (default = false) — Flag to output the int as big or little endian

Returns
String — A string of length 8 corresponding to the hex representation of n ( minus the leading "0x" )