Buffer for users' table SHA1 hash is set to zero before using it and strncopy used instead of snprintf

Buffer for users' table SHA1 hash is set to zero before using it and
strncopy used instead of snprintf