'Returns chap secret generated according to chap_name
chap secret must be between 12-16 chaqnracters'

def _generate_chap_secret(self, chap_name):

    name = chap_name
    chap_secret = ''
    while (len(chap_secret) < 12):
        chap_secret = cryptish.encrypt(name)[:16]
        name = (name + '_')
    LOG.debug('_generate_chap_secret:    %(secret)s', {'secret': chap_secret})
    return chap_secret
