Field Summary |
static
| hex_chr |
| Convert a 32-bit number to a hex string with ls-byte first
|
|
Method Summary |
static
| addme (
x, y
) |
| Add integers, wrapping at 2^32. This uses 16-bit operations internally to work around bugs in some AS interpreters. (Mac Flash!)
|
|
static
| bitAND (
a, b
) |
| bitwise AND for 32-bit integers. This uses 31 + 1-bit operations internally to work around bug in some AS interpreters. (Mac Flash!)
|
|
static
| bitOR (
a, b
) |
| somehow the expression (bitAND(b, c) | bitAND((~b), d)) didn't return coorect results on Mac for: b&c = a8a20450, ((~b)&d) = 0101c88b, (bitAND(b, c) | bitAND((~b), d)) = a8a20450 looks like the OR is not executed at all. let's try to trick the P-code compiler into working with us... Prayer beads are GO!
|
|
static
| bitXOR (
a, b
) |
| will bitXOR be the only one working...? Nope. XOR fails too if values with bit31 set are XORed. Note however that OR (and AND and XOR?!) works alright for the statement (msb31 << 1) | lsb even if the result of the left-shift operation has bit 31 set. So there might be an extra condition here (Guessmode turned on): Mac Flash fails (OR, AND and XOR) if either one of the input operands has bit31 set *and* both operands have one or more bits both set to 1. In other words: when both input bit-patterns 'overlap'. Stuff to munch on for the MM guys, I guess...
|
|
public static
| calcMD5 (
str
) |
| Take a string and return the hex representation of its MD5.
|
|
static
| cmn (
q, a, b, x, s, t
) |
| These static functions implement the basic operation for each round of the algorithm.
|
|
static
| ff (
a, b, c, d, x, s, t
) |
|
|
|
static
| gg (
a, b, c, d, x, s, t
) |
|
|
|
static
| hh (
a, b, c, d, x, s, t
) |
|
|
|
static
| ii (
a, b, c, d, x, s, t
) |
|
|
|
static
| rhex (
num
) |
|
|
|
static
| rol (
num, cnt
) |
| Bitwise rotate a 32-bit number to the left
|
|
static
| str2blks_MD5 (
str
) |
| Convert a string to a sequence of 16-word blocks, stored as an array. Append padding bits and the length, as described in the MD5 standard.
|
|
|