fixed possible missinterpretation of  hashlen when using the PHS interface