With the 0x prefix SQL Server indicates that the value is of the data type (Var)binary. - This is expected.
The completely different return value for the hashing of @pPassword must have a reason outside of the shown code. I would guess, that the value of @pPassword is different from the assumed value of 'joseph'.
The completely different return value for the hashing of @pPassword must have a reason outside of the shown code. I would guess, that the value of @pPassword is different from the assumed value of 'joseph'.