Cheapo Enigma machine (Cops) For robbers' post, Cheapo Enigma machine (Robbers)
A cop's submission will consist of a program/function that accepts a single byte of data and return a single byte of data. Every possible input must produce a unique output. (In the other words, your function must be bijective)
Robbers will attempt to create the inverse function of yours using as short a code as possible. So your objective is to make your function difficult to invert.
You cannot use built-ins that have the sole purpose of hashing or encryption.
Your byte count cannot exceed 64 bytes. 0-byte solutions are not eligible for winning.
Input/Output format
8 bits (0 or 1), or a base-10 integer in range 1-256, 0-255 or -128 to 127. Can use standard I/O or file I/O. Function can also return a value as output. Input and output should belong to the same range (binary, 1-256, 0-255 or -128 to 127).
The robber will also be required to use this range for input and output.
Scoring
Ratio of your byte count to that of the best robber's attempt against you. Lowest score wins.
You are eligible to win (as a cop) only if a robber has attempted to defeat you. (This robber may be you)
Example
C++, uses 0-255 range, 31 bytes
int x;
cin&gt;&gt;x;
cout&lt;&lt;(x+1)%256;

Possible robber submission in C++, 32 bytes
int f(int x)
{return x?x-1:255;}

Using the same language or a similar algorithm isn't a requirement
This gives a score of 31/32 = 0.97 to both the cop and the robber.
Javascript, 11 8 bytes, Score: 8 / 5
x=&gt;x^x/2

Simple implementation of gray code. Decoding usally needs a whole loop. Let's see who comes up with the smallest or even without a loop !