Class CipherGen

java.lang.Object
org.metricshub.winrm.light.CipherGen

public class CipherGen extends Object
Code from io.cloudsoft.winrm4j.client.ntlm.forks.httpclient.NTLMEngineImpl release 0.12.3 @link https://github.com/cloudsoft/winrm4j io.cloudsoft.winrm4j.client.ntlm.forks.httpclient is a fork of apache-httpclient 4.5.13
  • Constructor Details

    • CipherGen

      public CipherGen(Random random, long currentTime, String domain, String user, char[] password, byte[] challenge, byte[] targetInformation)
      Create a generator for the NTLM responses of one authentication exchange.
      Parameters:
      random - the random source for the client challenges and secondary key
      currentTime - the current time in milliseconds since the epoch (for the NTLMv2 timestamp)
      domain - the authentication domain (may be null)
      user - the user name
      password - the password, kept as char[] by reference and never turned into a String, so the caller retains the single wipeable copy of the secret
      challenge - the server challenge from the Type 2 message
      targetInformation - the target information block from the Type 2 message
  • Method Details

    • getSecondaryKey

      public byte[] getSecondaryKey()
      Calculate and return random secondary key
    • getLMResponse

      public byte[] getLMResponse() throws NtlmException
      Calculate and return the LMResponse
      Throws:
      NtlmException
    • getNTLMResponse

      public byte[] getNTLMResponse() throws NtlmException
      Calculate and return the NTLMResponse
      Throws:
      NtlmException
    • getNTLMv2Response

      public byte[] getNTLMv2Response() throws NtlmException
      Calculate the NTLMv2Response
      Throws:
      NtlmException
    • getLMv2Response

      public byte[] getLMv2Response() throws NtlmException
      Calculate the LMv2Response
      Throws:
      NtlmException
    • getNTLM2SessionResponse

      public byte[] getNTLM2SessionResponse() throws NtlmException
      Get NTLM2SessionResponse
      Throws:
      NtlmException
    • getLM2SessionResponse

      public byte[] getLM2SessionResponse()
      Calculate and return LM2 session response
    • getLMUserSessionKey

      public byte[] getLMUserSessionKey() throws NtlmException
      Get LMUserSessionKey
      Throws:
      NtlmException
    • getNTLMUserSessionKey

      public byte[] getNTLMUserSessionKey() throws NtlmException
      Get NTLMUserSessionKey
      Throws:
      NtlmException
    • getNTLMv2UserSessionKey

      public byte[] getNTLMv2UserSessionKey() throws NtlmException
      GetNTLMv2UserSessionKey
      Throws:
      NtlmException
    • getNTLM2SessionResponseUserSessionKey

      public byte[] getNTLM2SessionResponseUserSessionKey() throws NtlmException
      Get NTLM2SessionResponseUserSessionKey
      Throws:
      NtlmException
    • getLanManagerSessionKey

      public byte[] getLanManagerSessionKey() throws NtlmException
      Get LAN Manager session key
      Throws:
      NtlmException