Partially implemented bytewise encoding for keys.