Added optional return of the hash on verification