pingvincible 0 Newbie Poster

i want to write a little client-server program. one part will be on domain controller and another on user station. Client part must load before user login. it will make some mathematical operations and send the result to server together with username and password. server part must perform the same mathematic operations and compare own result with clients one. if compared results are the same then usual Active Directory login performed.
So, do you have any suggestions how to integrate any actions(in my case mathematical) into login process???