secure_server v0.1.0 SecureServer
SecureServer provides the encoder and decoder for secure Phoenix web servers.
While not all the functions defined here are used in Phoenix or Plug, they are important to have to implement a ‘complete’ encoder/decoder.
The encoding and decoding functions in this file MUST match those in
:secure_client
, or else they will not be able to communicate.
Summary
Functions
Decodes any encrypted, base64 encoded binary into a valid elixir structure
Decodes any encrypted, base64 encoded binary into a valid elixir structure
Encodes any valid elixir structure as an encrypted, base64 encoded binary
Encodes any valid elixir structure as an encrypted, base64 encoded binary
Calls encode/1
. Since the data ends up encoded with base64, the iodata is
the same as the binary
Calls encode!/1
. Since the data ends up encoded with base64, the iodata is
the same as the binary
Types
decoded :: map | struct | list
encoded :: binary
safe_decoded :: {:ok, decoded} | {:error, any}
safe_encoded :: {:ok, encoded} | {:error, any}
Functions
Specs
decode(encoded) :: safe_decoded
Decodes any encrypted, base64 encoded binary into a valid elixir structure.
Decodes any encrypted, base64 encoded binary into a valid elixir structure.
This method is used in Plug.Parsers.ENCRYPTED.
Specs
encode(decoded) :: safe_encoded
Encodes any valid elixir structure as an encrypted, base64 encoded binary.
Encodes any valid elixir structure as an encrypted, base64 encoded binary.
Specs
encode_to_iodata(decoded) :: safe_encoded
Calls encode/1
. Since the data ends up encoded with base64, the iodata is
the same as the binary.