Update hiddenWord to StringBuilder and update GenerateHiddenWord method

Update hiddenWord to StringBuilder and update GenerateHiddenWord method
to use StringBuilder