Tabnine Logo
HMACT64.digest
Code IndexAdd Tabnine to your IDE (free)

How to use
digest
method
in
jcifs.util.HMACT64

Best Java code snippets using jcifs.util.HMACT64.digest (Showing top 15 results out of 315)

origin: jcifs/jcifs

static byte[] computeResponse(byte[] responseKey,
      byte[] serverChallenge,
      byte[] clientData,
      int offset,
      int length)
{
  HMACT64 hmac = new HMACT64(responseKey);
  hmac.update(serverChallenge);
  hmac.update(clientData, offset, length);
  byte[] mac = hmac.digest();
  byte[] ret = new byte[mac.length + clientData.length];
  System.arraycopy(mac, 0, ret, 0, mac.length);
  System.arraycopy(clientData, 0, ret, mac.length, clientData.length);
  return ret;
}
public static byte[] getLMv2Response(
origin: com.jaeksoft/jcifs-krb5-jdk7

static byte[] computeResponse(byte[] responseKey,
      byte[] serverChallenge,
      byte[] clientData,
      int offset,
      int length)
{
  HMACT64 hmac = new HMACT64(responseKey);
  hmac.update(serverChallenge);
  hmac.update(clientData, offset, length);
  byte[] mac = hmac.digest();
  byte[] ret = new byte[mac.length + clientData.length];
  System.arraycopy(mac, 0, ret, 0, mac.length);
  System.arraycopy(clientData, 0, ret, mac.length, clientData.length);
  return ret;
}
public static byte[] getLMv2Response(
origin: com.jaeksoft/jcifs-krb5-jdk7

public static byte[] nTOWFv2(String domain, String username, String password)
{
  try {
    MD4 md4 = new MD4();
    md4.update(password.getBytes(SmbConstants.UNI_ENCODING));
    HMACT64 hmac = new HMACT64(md4.digest());
    hmac.update(username.toUpperCase().getBytes(SmbConstants.UNI_ENCODING));
    hmac.update(domain.getBytes(SmbConstants.UNI_ENCODING));
    return hmac.digest();
  } catch (UnsupportedEncodingException uee) {
    throw new RuntimeException(uee.getMessage());
  }
}
static byte[] computeResponse(byte[] responseKey,
origin: jcifs/jcifs

public static byte[] nTOWFv2(String domain, String username, String password)
{
  try {
    MD4 md4 = new MD4();
    md4.update(password.getBytes(SmbConstants.UNI_ENCODING));
    HMACT64 hmac = new HMACT64(md4.digest());
    hmac.update(username.toUpperCase().getBytes(SmbConstants.UNI_ENCODING));
    hmac.update(domain.getBytes(SmbConstants.UNI_ENCODING));
    return hmac.digest();
  } catch (UnsupportedEncodingException uee) {
    throw new RuntimeException(uee.getMessage());
  }
}
static byte[] computeResponse(byte[] responseKey,
origin: kohsuke/jcifs

static byte[] computeResponse(byte[] responseKey,
      byte[] serverChallenge,
      byte[] clientData,
      int offset,
      int length)
{
  HMACT64 hmac = new HMACT64(responseKey);
  hmac.update(serverChallenge);
  hmac.update(clientData, offset, length);
  byte[] mac = hmac.digest();
  byte[] ret = new byte[mac.length + clientData.length];
  System.arraycopy(mac, 0, ret, 0, mac.length);
  System.arraycopy(clientData, 0, ret, mac.length, clientData.length);
  return ret;
}
public static byte[] getLMv2Response(
origin: kohsuke/jcifs

public static byte[] nTOWFv2(String domain, String username, String password)
{
  try {
    MD4 md4 = new MD4();
    md4.update(password.getBytes(SmbConstants.UNI_ENCODING));
    HMACT64 hmac = new HMACT64(md4.digest());
    hmac.update(username.toUpperCase().getBytes(SmbConstants.UNI_ENCODING));
    hmac.update(domain.getBytes(SmbConstants.UNI_ENCODING));
    return hmac.digest();
  } catch (UnsupportedEncodingException uee) {
    throw new RuntimeException(uee.getMessage());
  }
}
static byte[] computeResponse(byte[] responseKey,
origin: jcifs/jcifs

hmac.update(user.toUpperCase().getBytes(SmbConstants.UNI_ENCODING));
hmac.update(domain.toUpperCase().getBytes(SmbConstants.UNI_ENCODING));
hmac = new HMACT64(hmac.digest());
hmac.update(challenge);
hmac.update(clientChallenge);
hmac.digest(response, 0, 16);
System.arraycopy(clientChallenge, 0, response, 16, 8);
return response;
origin: com.jaeksoft/jcifs-krb5-jdk7

hmac.update(user.toUpperCase().getBytes(SmbConstants.UNI_ENCODING));
hmac.update(domain.toUpperCase().getBytes(SmbConstants.UNI_ENCODING));
hmac = new HMACT64(hmac.digest());
hmac.update(challenge);
hmac.update(clientChallenge);
hmac.digest(response, 0, 16);
System.arraycopy(clientChallenge, 0, response, 16, 8);
return response;
origin: kohsuke/jcifs

hmac.update(user.toUpperCase().getBytes(SmbConstants.UNI_ENCODING));
hmac.update(domain.toUpperCase().getBytes(SmbConstants.UNI_ENCODING));
hmac = new HMACT64(hmac.digest());
hmac.update(challenge);
hmac.update(clientChallenge);
hmac.digest(response, 0, 16);
System.arraycopy(clientChallenge, 0, response, 16, 8);
return response;
origin: kohsuke/jcifs

  hmac.update(domain.toUpperCase().getBytes(
      SmbConstants.UNI_ENCODING));
  byte[] ntlmv2Hash = hmac.digest();
  hmac = new HMACT64(ntlmv2Hash);
  hmac.update(challenge);
  hmac.update(clientChallenge); 
  HMACT64 userKey = new HMACT64(ntlmv2Hash); 
  userKey.update(hmac.digest()); 
  userKey.digest(dest, offset, 16); 
  break; 
default: 
origin: jcifs/jcifs

  hmac.update(domain.toUpperCase().getBytes(
      SmbConstants.UNI_ENCODING));
  byte[] ntlmv2Hash = hmac.digest();
  hmac = new HMACT64(ntlmv2Hash);
  hmac.update(challenge);
  hmac.update(clientChallenge); 
  HMACT64 userKey = new HMACT64(ntlmv2Hash); 
  userKey.update(hmac.digest()); 
  userKey.digest(dest, offset, 16); 
  break; 
default: 
origin: com.jaeksoft/jcifs-krb5-jdk7

  hmac.update(domain.toUpperCase().getBytes(
      SmbConstants.UNI_ENCODING));
  byte[] ntlmv2Hash = hmac.digest();
  hmac = new HMACT64(ntlmv2Hash);
  hmac.update(challenge);
  hmac.update(clientChallenge); 
  HMACT64 userKey = new HMACT64(ntlmv2Hash); 
  userKey.update(hmac.digest()); 
  userKey.digest(dest, offset, 16); 
  break; 
default: 
origin: jcifs/jcifs

  byte[] ntlm2SessionKey = hmac.digest();
HMACT64 hmac = new HMACT64(responseKeyNT);
hmac.update(ntResponse, 0, 16); // only first 16 bytes of ntResponse
byte[] userSessionKey = hmac.digest();
origin: kohsuke/jcifs

  byte[] ntlm2SessionKey = hmac.digest();
HMACT64 hmac = new HMACT64(responseKeyNT);
hmac.update(ntResponse, 0, 16); // only first 16 bytes of ntResponse
byte[] userSessionKey = hmac.digest();
origin: com.jaeksoft/jcifs-krb5-jdk7

  byte[] ntlm2SessionKey = hmac.digest();
HMACT64 hmac = new HMACT64(responseKeyNT);
hmac.update(ntResponse, 0, 16); // only first 16 bytes of ntResponse
byte[] userSessionKey = hmac.digest();
jcifs.utilHMACT64digest

Popular methods of HMACT64

  • <init>
    Creates an HMACT64 instance which uses the given secret key material.
  • engineReset
  • update

Popular in Java

  • Start an intent from android
  • setContentView (Activity)
  • getApplicationContext (Context)
  • getSupportFragmentManager (FragmentActivity)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now