To store an input string of M N-tuples of bits, a substitution
transformation is selected in accordance with the input string and is
applied to the input string to provide a transformed string of M N-tuples
of bits. M or more memory cells are programmed to represent the
transformed string and preferably also to represent a key of the
transformation. Alternatively, the memory selectively programs each of M
or more cells to a respective one of 2.sup.N states. A mapping that maps
the binary numbers in [0,2.sup.N-1] into respective states is selected in
accordance with the input string and is used to program M cells to
represent the input string. Preferably, a key of the mapping is stored in
the memory in association with the M cells.