uh, in python:
import string, random
''.join(random.sample((string.letters+string.digits), 12))
I hope that's what you were asking for. If not, you might want to clarify your question.