SSL.Protocol.Record (ex_ssl v0.16.7)

Copy Markdown View Source

Pure TLS 1.3 encrypted record protection for one complete framed record.

Stream accumulation remains the responsibility of SSL.Protocol.RecordFramer. Successful operations return an immutable traffic state advanced by one record; failures return no advanced state.

Summary

Functions

decrypt(state, record)

encrypt(state, content_type, content, options \\ [])

@spec encrypt(SSL.Crypto.TrafficState.t(), term(), term(), keyword()) ::
  {:ok, binary(), SSL.Crypto.TrafficState.t()} | {:error, term()}