Paper by the Australian Bureau of Statistics (ABS) at the 2013 Work Session on Statistical Data Confidentiality: Methodology for the Automatic Confdentialisation of Statistical Outputs from Remote Servers at the Australian, Gwenda Thompson, Stephen Broadfoot, Daniel Elazar.
The ABS paper describes from page 10 a way to deal with weights (this is, a generalisation from the original census context to application in sample surveys).
Eurostat produced the following SAS code for the conversion of unique record identifiers into pseudo-random record keys:
format rkey best32.; /* cell key: define rkey format */
hash_hex = put(md5(COUNTRY||YEAR||QUARTER||HHNUM||HHSEQNUM), hex32.); /* cell key: first compute MD5 hash */
hash_int = input(hash_hex, IB4.); /* cell key: convert to int (IB8. not accepted by RANUNI) */
call ranuni(hash_int, rkey); /* cell key: then compute actual rkey in [0, 1] */