vb.net - Confusion with Securestring -
i being bit thick. need write program has machine local admin account username , password hardcoded (so normal user can call validatecredentials on principalcontext)
private function validatead(byval username string, byval password string) boolean dim valid boolean = false using context principalcontext = new principalcontext(contexttype.machine, nothing, "administrator", "hardcodedadminpassword") valid = context.validatecredentials(username, password) end using return valid end function
this bad idea, looking securestring.
however data secure string, don't need pass in regular string, (which immutable, , giving initial security risk)
where wrong?
Comments
Post a Comment