import hashlib

from pylons import g


def make_secret_code(meetup, user):
    hash = hashlib.md5(g.SECRET)
    hash.update(str(meetup._id))
    hash.update(str(user._id))
    return int(hash.hexdigest()[-8:], 16) % 100

import hashlib

from pylons import g


def make_secret_code(meetup, user):
    hash = hashlib.md5(g.secrets["SECRET"])
    hash.update(str(meetup._id))
    hash.update(str(user._id))
    return int(hash.hexdigest()[-8:], 16) % 100

Use the zk secret safe for g.SECRET.
Use the zk secret safe for g.SECRET.

  import hashlib
  
  from pylons import g
  
  
  def make_secret_code(meetup, user):
-     hash = hashlib.md5(g.SECRET)
+     hash = hashlib.md5(g.secrets["SECRET"])
      hash.update(str(meetup._id))
      hash.update(str(user._id))
      return int(hash.hexdigest()[-8:], 16) % 100
  
Use the zk secret safe for g.SECRET.
## Code Before:
import hashlib

from pylons import g


def make_secret_code(meetup, user):
    hash = hashlib.md5(g.SECRET)
    hash.update(str(meetup._id))
    hash.update(str(user._id))
    return int(hash.hexdigest()[-8:], 16) % 100

## Instruction:
Use the zk secret safe for g.SECRET.
## Code After:
import hashlib

from pylons import g


def make_secret_code(meetup, user):
    hash = hashlib.md5(g.secrets["SECRET"])
    hash.update(str(meetup._id))
    hash.update(str(user._id))
    return int(hash.hexdigest()[-8:], 16) % 100
