public static string CreateToken(RegistrationData rd)
        {
            string obj   = JsonSerializer.Serialize <RegistrationData>(rd);
            string token = SecurityMethods.GetSHA1Hash(obj);

            return(token);
        }
        public static RegistrationData DBWrapper(UserRegistrition ri)
        {
            RegistrationData rd = new RegistrationData();

            rd.Login    = ri.Login;
            rd.Name     = ri.Name;
            rd.Password = SecurityMethods.GetSHA1Hash(ri.Password);

            return(rd);
        }