Genericize key generation for raet/zeromq