|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.mud.ssh.SshMisc
Constructor Summary | |
SshMisc()
|
Method Summary | |
static byte[] |
addArrayOfBytes(byte[] a,
byte[] b)
|
static long |
crc32(byte[] s,
int len)
Compute the crc Cyclic Redundancy Check, with the polynomial 0xedb88320, The polynomial is X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 We take it "backwards" and put the highest-order term in the lowest-order bit. |
static byte[] |
createString(java.lang.String str)
Return a Arbitrary length binary string First 4 bytes are the length of the string, msb first (not including the length itself). |
static byte[] |
getMpInt(int offset,
byte[] byteArray)
Return the mp-int at the position offset in the data First 2 bytes are the number of bits in the integer, msb first (for example, the value 0x00012345 would have 17 bits). |
static byte |
getNotZeroRandomByte()
|
static java.lang.String |
getString(int offset,
byte[] byteArray)
return the strint at the position offset in the data First 4 bytes are the length of the string, msb first (not including the length itself). |
static byte[] |
XORArrayOfBytes(byte[] a,
byte[] b)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SshMisc()
Method Detail |
public static java.lang.String getString(int offset, byte[] byteArray) throws java.io.IOException
java.io.IOException
public static byte getNotZeroRandomByte()
public static byte[] addArrayOfBytes(byte[] a, byte[] b)
public static byte[] XORArrayOfBytes(byte[] a, byte[] b)
public static byte[] getMpInt(int offset, byte[] byteArray) throws java.io.IOException
java.io.IOException
public static byte[] createString(java.lang.String str) throws java.io.IOException
java.io.IOException
public static long crc32(byte[] s, int len)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |