public void ProtectedString_DoesNotEqualUnprotectedString() { var unprotectedString = "Testing 123"; var protectedString = Protector.ProtectString(unprotectedString); Assert.NotEqual(protectedString, unprotectedString); }
public void ProtectedString_Unprotected_EqualsOriginalUnprotectedString() { var unprotectedString = "Testing 123"; var protectedString = Protector.ProtectString(unprotectedString); var recoveredString = Protector.UnprotectString(protectedString); Assert.Equal(recoveredString, unprotectedString); }
public static DataAccessAction UpdateBuild(Build build) { return(new DataAccessAction((ICrmPlusPlus crm) => { build.Validate(); build.Password = Protector.ProtectString(build.Password); crm.EntityClient.Update(build); })); }