From: Meino Christian Cramer Date: 2006-08-06T03:48:14+09:00 Subject: Smoking hash-ish: Letter mapping... Hi, for a *very* simplistic encryption program I want to build a hash, which should be dynamically build (not hardcoded). The input of the method which should do the job will be a range of any meaningful input, say: parameter 1: A and parameter 2: Z Then the method should create a Hash with that mapping "A" -> "Z" "B" -> "G" "C" -> "T" ... or in other words: The key should follow the given range, and the values should represent all values of that range but in random order. For arrays I learned a nice trick from this list: encmap=(A..Z).to_a.sort{rand(2)} but...how can I accomplish similiar for a hash ??? And: I sthere a simple way to store a hash in binary format and later load that hash again into memory ? Nice weekend! mcc