class Stremio::Addon::DevKit::UserData::V1::Header
- Stremio::Addon::DevKit::UserData::V1::Header
- BitFields
- Reference
- Object
Overview
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
Defined in:
stremio-addon-devkit/userdata/v1.crConstant Summary
-
BIT_COUNT =
LENGTHS.sum
-
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
-
BYTE_COUNT =
(BIT_COUNT / 8.0).ceil.to_i
-
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
-
BYTESIZE =
2
-
How many bytes this header takes
-
FIELDS =
{reserve => UInt8, keyring => UInt8, compress => UInt8, version => UInt8, iv_random => UInt8} of Nil => Nil
-
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
-
LENGTHS =
[1, 3, 1, 3, 8] of Int32
-
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
-
VERSION =
1_u8
-
The version we register as (must fit within
@version
)
Constructors
-
.new(bytes : Bytes)
Our enrypted userdata contains a custom header.
Class Method Summary
-
.create(bytes : Bytes)
Returns a
Header
constructed withbytes
Paramaters: *bytes
: The header in network byte order, meaning bytes[0] contains the "high" bits -
.create(random_generator = Random::Secure)
Returns an empty
Header
header with the version set
Instance Method Summary
-
#compress : UInt8
Our enrypted userdata contains a custom header.
-
#compress=(v : UInt8)
Our enrypted userdata contains a custom header.
-
#iv(iv_static : Nil)
Returns a cryptocraphically random initial vector Paramaters: *
iv_static
: An optional fragement of the initial vector. -
#iv(iv_static)
Returns a cryptocraphically random initial vector Paramaters: *
iv_static
: An optional fragement of the initial vector. -
#iv_random : UInt8
Our enrypted userdata contains a custom header.
-
#iv_random=(v : UInt8)
Our enrypted userdata contains a custom header.
-
#keyring : UInt8
Our enrypted userdata contains a custom header.
-
#keyring=(v : UInt8)
Our enrypted userdata contains a custom header.
-
#reserve : UInt8
Our enrypted userdata contains a custom header.
-
#reserve=(v : UInt8)
Our enrypted userdata contains a custom header.
-
#to_s
Our enrypted userdata contains a custom header.
-
#to_slice
Our enrypted userdata contains a custom header.
-
#to_t
Our enrypted userdata contains a custom header.
-
#version : UInt8
Our enrypted userdata contains a custom header.
-
#version=(v : UInt8)
Our enrypted userdata contains a custom header.
Constructor Detail
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
Class Method Detail
Returns a Header
constructed with bytes
Paramaters:
bytes
: The header in network byte order, meaning bytes[0] contains the "high" bits
WARNING the use of Header.new()
should be avoided (and for some reason we cannot create our own initialize()
Returns an empty Header
header with the version set
Parameters:
random_generator
uses a pseudo or real random number generator,::Random#new
can be used for unit tests
WARNING the use of Header.new()
should be avoided (and for some reason we cannot create our own initialize()
Instance Method Detail
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
Returns a cryptocraphically random initial vector Paramaters:
iv_static
: An optional fragement of the initial vector. The#iv_random
+iv_static
create enough entropy that we can build a suitable iv
Returns a cryptocraphically random initial vector Paramaters:
iv_static
: An optional fragement of the initial vector. The#iv_random
+iv_static
create enough entropy that we can build a suitable iv
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)
Our enrypted userdata contains a custom header. We can support different versions of these header. This class defines Version 1.
WARNING Headers are stored and transmitted as big endian (aka: network byte order)