anchor.diff:  			'Origin-Realm' = OriginRealm},
   	ok = ocs_log:auth_log(diameter, Server, Client, Request, Answer),
   	gen_server:cast(PortServer, {self(), Answer});
  +send_diameter_response(SId, AuthType, ?'DIAMETER_BASE_RESULT-CODE_SUCCESS',
  +		OriginHost, OriginRealm, #eap_packet{} = EapPacket,
  +		PortServer, #diameter_eap_app_DER{} = Request,
  +		#statedata{server_address = ServerAddress, server_port = ServerPort,
  +		client_address = ClientAddress, client_port = ClientPort,
  +		msk = MSK} = _StateData) when is_list(SId), is_integer(AuthType),
  +		is_binary(OriginHost), is_binary(OriginRealm), is_pid(PortServer) ->
  +	Server = {ServerAddress, ServerPort},
  +	Client= {ClientAddress, ClientPort},
  +	try
  +		EapData = ocs_eap_codec:eap_packet(EapPacket),
  +		Answer = #diameter_eap_app_DEA{'Session-Id' = SId,
  +				'Auth-Application-Id' = ?EAP_APPLICATION_ID,
  +				'Auth-Request-Type' = AuthType,
  +				'Result-Code' = ?'DIAMETER_BASE_RESULT-CODE_SUCCESS',
  +				'Origin-Host' = OriginHost, 'Origin-Realm' = OriginRealm,
  +				'EAP-Payload' = [EapData], 'EAP-Master-Session-Key' = [MSK]},
  +		ok = ocs_log:auth_log(diameter, Server, Client, Request, Answer),
  +		gen_server:cast(PortServer, {self(), Answer})
  +	catch
  +		_:_ ->
  +			Answer1 = #diameter_eap_app_DEA{'Session-Id' = SId,
  +					'Auth-Application-Id' = ?EAP_APPLICATION_ID,
  +					'Auth-Request-Type' = AuthType,
  +					'Result-Code' = ?'DIAMETER_BASE_RESULT-CODE_UNABLE_TO_COMPLY',
  +					'Origin-Host' = OriginHost,
  +					'Origin-Realm' = OriginRealm},
  +			ok = ocs_log:auth_log(diameter, Server, Client, Request, Answer1),
  +			gen_server:cast(PortServer, {self(), Answer1})
  +	end;
   send_diameter_response(SId, AuthType, ResultCode,
   		OriginHost, OriginRealm, #eap_packet{} = EapPacket,
   		PortServer, #diameter_eap_app_DER{} = Request,
  
positive.code: 	T2 = crypto:hmac(sha256, K, <<T1/binary, S/binary, P>>),
  	prf(K, S, N, P + 1, T2, [T2 | Acc]).
  
  
negative.code: 				EapMessage1 = ocs_eap_codec:eap_packet(EapPacket#eap_packet{data = Data1}),
  				case crypto:hmac(sha256, Kaut, EapMessage1, 16) of
  					MAC ->
  						Salt = crypto:rand_uniform(16#8000, 16#ffff),
  						<<MSK1, MSK2>> = MSK,
  						MsMppeRecvKey = encrypt_key(Secret, RequestAuthenticator, Salt, MSK1),
  						MsMppeSendKey = encrypt_key(Secret, RequestAuthenticator, Salt, MSK2),
  						UserName = binary_to_list(Identity),
  						Attributes = radius_attributes:new(),
  						Attr1 = radius_attributes:store(?UserName, UserName, Attributes),
  						Attr2 = radius_attributes:store(?Microsoft,
  								?MsMppeRecvKey, {Salt, MsMppeRecvKey}, Attr1),
  						Attr3 = radius_attributes:store(?Microsoft,
  								?MsMppeSendKey, {Salt, MsMppeSendKey}, Attr2),
  						EapPacket = #eap_packet{code = success, identifier = EapID},
  						send_radius_response(EapPacket, ?AccessAccept, Attr3, RadiusID,
  								RequestAuthenticator, RequestAttributes, NewStateData),
  						{stop, {shutdown, SessionID}, NewStateData};
  					_ ->
  