public static int enc_uint64be( long l, byte[] dst, int di ) { enc_uint32be( (int)(l & 0xFFFFFFFFL), dst, di + 4 ); enc_uint32be( (int)(( l >> 32L ) & 0xFFFFFFFFL), dst, di ); return 8; } public static int enc_uint64le( long l, byte[] dst, int di )
/** * This must be called before <tt>getInstance</tt> is called or * it will have no effect. */ public static void setInstance( PrintStream stream ) { inst = new LogStream( stream ); } public static LogStream getInstance() {
private void decrypt( byte[] cipherText, int cipherOff, byte[] clearText, int clearOff ) { squashBytesToInts( cipherText, cipherOff, tempInts, 0, 2 ); des( tempInts, tempInts, decryptKeys ); spreadIntsToBytes( tempInts, 0, clearText, clearOff, 2 ); }
public static int enc_uint64le ( long l, byte[] dst, int di ) { enc_uint32le((int) ( l & 0xFFFFFFFFL ), dst, di); enc_uint32le((int) ( ( l >> 32L ) & 0xFFFFFFFFL ), dst, di + 4); return 8; }
public static long dec_uint64le( byte[] src, int si ) { long l; l = dec_uint32le( src, si + 4 ) & 0xFFFFFFFFL; l <<= 32L; l |= dec_uint32le( src, si ) & 0xFFFFFFFFL; return l; }
/** * {@inheritDoc} * * @see jcifs.internal.smb2.ServerMessageBlock2#toString() */ @Override public String toString () { return "Smb2OpblockBreakNotification[oplockLevel=" + this.oplockLevel + ",fileId=" + Hexdump.toHexString(this.fileId) + "]"; } }
public DES( byte[] key ) { if( key.length == 7 ) { byte[] key8 = new byte[8]; makeSMBKey( key, key8 ); setKey( key8 ); } else { setKey( key ); } }
/** * * @param key * @return HMACT64 MAC */ public static MessageDigest getHMACT64 ( byte[] key ) { return new HMACT64(key); }
public static LogStream getInstance() { if( inst == null ) { setInstance( System.err ); } return inst; } }
public int available() throws IOException { if( file.log.level >= 3 ) file.log.println( "Named Pipe available() does not apply to TRANSACT Named Pipes" ); return 0; } int receive( byte[] b, int off, int len ) {
/** * * @param str * @return the string as bytes (UTF16-LE) */ public static byte[] getUNIBytes ( String str ) { return getBytes(str, UNI_ENCODING); }
/** * Construct a digest with a non-zero starting sequence number * * @param macSigningKey * @param initialSequence */ public SMB1SigningDigest ( byte[] macSigningKey, int initialSequence ) { this.digest = Crypto.getMD5(); this.macSigningKey = macSigningKey; this.signSequence = initialSequence; }
private void encrypt( byte[] clearText, int clearOff, byte[] cipherText, int cipherOff ) { squashBytesToInts( clearText, clearOff, tempInts, 0, 2 ); des( tempInts, tempInts, encryptKeys ); spreadIntsToBytes( tempInts, 0, cipherText, cipherOff, 2 ); }
@Override public String toString () { String ret = "FileNotifyInformation[nextEntry=" + this.nextEntryOffset + ",action=0x" + Hexdump.toHexString(this.action, 4) + ",file=" + this.fileName + "]"; return ret; } }
public DES( byte[] key ) { if( key.length == 7 ) { byte[] key8 = new byte[8]; makeSMBKey( key, key8 ); setKey( key8 ); } else { setKey( key ); } }
public static int enc_uint64be( long l, byte[] dst, int di ) { enc_uint32be( (int)(l & 0xFFFFFFFFL), dst, di + 4 ); enc_uint32be( (int)(( l >> 32L ) & 0xFFFFFFFFL), dst, di ); return 8; } public static int enc_uint64le( long l, byte[] dst, int di )
/** * This must be called before <tt>getInstance</tt> is called or * it will have no effect. */ public static void setInstance( PrintStream stream ) { inst = new LogStream( stream ); } public static LogStream getInstance() {
/** * * @param str * @return the string as bytes (ASCII) */ public static byte[] getASCIIBytes ( String str ) { return getBytes(str, ASCII_ENCODING); }
static String getResultMessage(int result) { return result < 4 ? result_message[result] : "0x" + jcifs.util.Hexdump.toHexString(result, 4); } public DcerpcException getResult() {
static String getResultMessage(int result) { return result < 4 ? result_message[result] : "0x" + jcifs.util.Hexdump.toHexString(result, 4); } public DcerpcException getResult() {