Derk2006/moonsso/src/ntlm does not have a README file
pub suberror MessageError {
Truncated(Int)
BadSignature
BadMessageType(Int)
BadField(Int, Int, Int)
}pub struct Type2 {
flags : UInt
server_challenge : Bytes
target_name : Bytes
target_info : Bytes
}pub struct Type3 {
flags : UInt
lm_response : Bytes
nt_response : Bytes
domain : String
user : String
workstation : String
mic : Bytes
}fn acceptor_mech_list_mic(session_base_key : Bytes, flags : UInt, mech_list_der : Bytes) -> Bytesfn av_flags_of(target_info : Bytes) -> UIntfn av_timestamp_of(target_info : Bytes) -> UInt64?fn blob_claims_mic(nt_response : Bytes) -> Boolfn can_sign(flags : UInt) -> Boolfn compute_mic(session_key : Bytes, type1 : Bytes, type2 : Bytes, type3 : Bytes) -> Bytesfn encode_type1(flags : UInt) -> Bytesfn encode_type2(flags : UInt, server_challenge : Bytes, target_name : Bytes, target_info : Bytes) -> Bytesfn encode_type3(user : String, domain : String, workstation : String, lm_response : Bytes, nt_response : Bytes, session_key : Bytes, flags : UInt) -> Bytesfn encode_type3_with_mic(user : String, domain : String, workstation : String, lm_response : Bytes, nt_response : Bytes, session_key : Bytes, flags : UInt, mic : Bytes) -> Bytesfn lmv2_response(user : String, domain : String, password : String, server_challenge : Bytes, client_challenge : Bytes) -> Bytesfn mac(signing_key : Bytes, flags : UInt, seq_num : UInt, message : Bytes) -> BytesVersion = 0x00000001
Checksum = HMAC_MD5(SigningKey, SeqNum || Message)[0..8]
SeqNum = SeqNumfn make_blob(timestamp : UInt64, client_challenge : Bytes, target_info : Bytes) -> Bytesfn mech_list_mic(session_base_key : Bytes, flags : UInt, mech_list_der : Bytes) -> Bytesfn nt_hash(password : String) -> Bytesfn ntlmv2_hash(user : String, domain : String, password : String) -> Bytesfn ntlmv2_response(user : String, domain : String, password : String, server_challenge : Bytes, blob : Bytes) -> Bytesfn session_base_key(user : String, domain : String, password : String, nt_proof : Bytes) -> Bytesfn signing_key(session_base_key : Bytes, flags : UInt, initiator : Bool) -> Bytesfn token_to_header(token : Bytes) -> Stringfn verify_acceptor_mech_list_mic(session_base_key : Bytes, flags : UInt, mech_list_der : Bytes, mic : Bytes) -> Boolfn verify_mac(signing_key : Bytes, flags : UInt, seq_num : UInt, message : Bytes, signature : Bytes) -> Boolfn verify_mech_list_mic(session_base_key : Bytes, flags : UInt, mech_list_der : Bytes, mic : Bytes) -> Boolfn verify_mic(session_key : Bytes, type1 : Bytes, type2 : Bytes, type3 : Bytes) -> Boolfn verify_response(user : String, domain : String, password : String, server_challenge : Bytes, response : Bytes) -> Boolfn with_av_flags(target_info : Bytes, flags : UInt) -> BytesInstall
Download zipNTLMv2 challenge-response for MoonBit, without FFI