Example of two factor authentication algorithm