def encode_id(config_id_secret, obj_id):
 id_cipher = Blowfish.new(config_id_secret)
 s = str(obj_id)
 s = (('!' * (8 - (len(s) % 8))) + s)
 return id_cipher.encrypt(s).encode('hex')

def encode_id ( config_id_secret , obj_id ) : id_cipher = Blowfish . new ( config_id_secret ) s = str ( obj_id ) s = ( ( '!' * ( 8 - ( len ( s ) % 8 ) ) ) + s ) return id_cipher . encrypt ( s ) . encode ( 'hex' )
utility method to encode ids .