* changes: [nearby] Update encoding and decoding according to the spec [nearby] Update encryption methods according to the spec