add authentication encoding support for both new and old community versions
Merge pull request #262 from LipuFei/id-hash-for-oldandnew

Add authentication encoding support for both new and old community versions