XDR kommit v0.1.0 XDR.FixedOpaque View Source

This module is in charge of process the Fixed Length Opaque based on the RFC4506 XDR Standard

Link to this section Summary

Types

t()

Every Fixed length opaque structure has a opaque which represent the XDR to fix and its length

Functions

this function is in charge of decode an XDR into a Fixed Length Opaque, it receives an XDR.FixedOpaque structure which contains the binary to decode

this function is in charge of decode an XDR into a Fixed Length Opaque, it receives an XDR.FixedOpaque structure which contains the binary to decode

this function is in charge of encode a Fixed Length Opaque into an XDR, it receives an XDR.FixedOpaque structure which contains the bytes to encode

this function is in charge of encode a Fixed Length Opaque into an XDR, it receives an XDR.FixedOpaque structure which contains the bytes to encode

this function provides an easy way to create an XDR.FixedOpaque type

Link to this section Types

Specs

t() :: %XDR.FixedOpaque{length: integer(), opaque: binary() | nil}

Every Fixed length opaque structure has a opaque which represent the XDR to fix and its length

Link to this section Functions

Specs

decode_xdr(bytes :: binary(), opts :: map()) :: {:ok, {t(), binary()}}

this function is in charge of decode an XDR into a Fixed Length Opaque, it receives an XDR.FixedOpaque structure which contains the binary to decode

returns an :ok tuple with the resulted binary

Link to this function

decode_xdr!(bytes, opaque)

View Source

Specs

decode_xdr!(bytes :: binary(), opaque :: map()) :: {t(), binary()}

this function is in charge of decode an XDR into a Fixed Length Opaque, it receives an XDR.FixedOpaque structure which contains the binary to decode

returns the resulted binary

Specs

encode_xdr(map()) :: {:ok, binary()}

this function is in charge of encode a Fixed Length Opaque into an XDR, it receives an XDR.FixedOpaque structure which contains the bytes to encode

returns an ok tuple with the resulted XDR

Specs

encode_xdr!(map()) :: binary()

this function is in charge of encode a Fixed Length Opaque into an XDR, it receives an XDR.FixedOpaque structure which contains the bytes to encode

returns the resulted XDR

Specs

new(opaque :: binary(), length :: integer()) :: t()

this function provides an easy way to create an XDR.FixedOpaque type

returns a XDR.FixedOpaque struct with the value received as parameter