grizzly v0.8.5 Grizzly.DSK View Source
Module for working with the SmartStart and S2 DSKs
Link to this section Summary
Types
The DSK binary is the elixir binary string form of the DSK
The DSK string is the string version of the DSK
Functions
Take a binary representation of the DSK and change it into the string representation
Take a string representation of the DSK and change it into the binary representation
Link to this section Types
dsk_binary()
View Source
dsk_binary() :: binary()
dsk_binary() :: binary()
The DSK binary is the elixir binary string form of the DSK
The format is <<b1, b2, b3, ... b16>>
That is 16 bytes.
An example of this would be:
<<196, 109, 73, 131, 38, 196, 119, 227, 62, 101, 131, 175, 15, 165, 14, 39>>
dsk_string()
View Source
dsk_string() :: String.t()
dsk_string() :: String.t()
The DSK string is the string version of the DSK
The general format is XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX
That is 8 blocks of 16 bit integers separated by a dash.
An example of this would be 50285-18819-09924-30691-15973-33711-04005-03623
Link to this section Functions
binary_to_string(dsk_binary)
View Source
binary_to_string(dsk_binary()) ::
{:ok, dsk_string()} | {:error, :dsk_too_short | :dsk_too_long}
binary_to_string(dsk_binary()) :: {:ok, dsk_string()} | {:error, :dsk_too_short | :dsk_too_long}
Take a binary representation of the DSK and change it into the string representation
string_to_binary(dsk_string)
View Source
string_to_binary(dsk_string()) ::
{:ok, dsk_binary()} | {:error, :dsk_too_short | :dsk_too_long}
string_to_binary(dsk_string()) :: {:ok, dsk_binary()} | {:error, :dsk_too_short | :dsk_too_long}
Take a string representation of the DSK and change it into the binary representation