PaperForge.Security (PaperForge v1.4.1)

Copy Markdown View Source

PDF AES-256 encryption and document permission policy.

Passwords and derived keys exist only for the duration of serialization and are never stored in PaperForge.Document.

Summary

Types

t()

@type t() :: %PaperForge.Security{
  dictionary: map(),
  encrypt_metadata: boolean(),
  file_id: binary(),
  file_key: binary(),
  object_id: pos_integer(),
  random: (pos_integer() -> binary())
}

Functions

encrypt_object(value, context)

@spec encrypt_object(term(), t()) :: term()

prepare(objects, options)

@spec prepare(
  [PaperForge.Object.t()],
  keyword()
) :: {:ok, t(), PaperForge.Object.t()} | {:error, term()}