telegram/utils/session_generate.v

12 lines
224 B
V

module utils
import crypto.md5
import time
pub fn generate_signature(quizID string,respondent_id string) string {
mut u := time.now().unix().str()
u += quizID + respondent_id
hash := md5.hexhash(u)
return hash[..20]
}