Module: LiveF1::Packet::Decryptable

Overview

Packets which mixin the Decryptable module represent data that is encrypted in the data stream.

When setting the packet data we transparently decrypt the data, and also set a raw_data containing the original, encrypted bytes in case they are useful

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#raw_dataObject (readonly)

Returns the value of attribute raw_data.



10
11
12
# File 'lib/live_f1/packet/decryptable.rb', line 10

def raw_data
  @raw_data
end

Instance Method Details

#bytesObject



17
18
19
# File 'lib/live_f1/packet/decryptable.rb', line 17

def bytes
  @raw_data
end

#data=(bytes) ⇒ Object



12
13
14
15
# File 'lib/live_f1/packet/decryptable.rb', line 12

def data= bytes
  @raw_data = bytes
  @data = source.decrypt(bytes)
end