Package org.metricshub.winrm.light
Class CipherGen
java.lang.Object
org.metricshub.winrm.light.CipherGen
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]Get LAN Manager session keybyte[]Calculate and return LM2 session responsebyte[]Calculate and return the LMResponsebyte[]Get LMUserSessionKeybyte[]Calculate the LMv2Responsebyte[]Get NTLM2SessionResponsebyte[]Get NTLM2SessionResponseUserSessionKeybyte[]Calculate and return the NTLMResponsebyte[]Get NTLMUserSessionKeybyte[]Calculate the NTLMv2Responsebyte[]GetNTLMv2UserSessionKeybyte[]Calculate and return random secondary key
-
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 keycurrentTime- the current time in milliseconds since the epoch (for the NTLMv2 timestamp)domain- the authentication domain (may benull)user- the user namepassword- the password, kept aschar[]by reference and never turned into aString, so the caller retains the single wipeable copy of the secretchallenge- the server challenge from the Type 2 messagetargetInformation- the target information block from the Type 2 message
-
-
Method Details
-
getSecondaryKey
public byte[] getSecondaryKey()Calculate and return random secondary key -
getLMResponse
Calculate and return the LMResponse- Throws:
NtlmException
-
getNTLMResponse
Calculate and return the NTLMResponse- Throws:
NtlmException
-
getNTLMv2Response
Calculate the NTLMv2Response- Throws:
NtlmException
-
getLMv2Response
Calculate the LMv2Response- Throws:
NtlmException
-
getNTLM2SessionResponse
Get NTLM2SessionResponse- Throws:
NtlmException
-
getLM2SessionResponse
public byte[] getLM2SessionResponse()Calculate and return LM2 session response -
getLMUserSessionKey
Get LMUserSessionKey- Throws:
NtlmException
-
getNTLMUserSessionKey
Get NTLMUserSessionKey- Throws:
NtlmException
-
getNTLMv2UserSessionKey
GetNTLMv2UserSessionKey- Throws:
NtlmException
-
getNTLM2SessionResponseUserSessionKey
Get NTLM2SessionResponseUserSessionKey- Throws:
NtlmException
-
getLanManagerSessionKey
Get LAN Manager session key- Throws:
NtlmException
-