# Drm

**About: Drm License server responsible for Generating/Validating licenses**

## Installation

If [available in Hex](, the package can be installed by adding `drm` to your list of
dependencies in `mix.exs`:

def deps do
    {:drm, "~> 0.2.1"}

## Config

config :drm,
 allow_burner_emails: true,
 max_floats: 5, 
 path: Path.expand("../priv/license", __DIR__),  
 refresh_interval: 2000,
 key: "yyyyy",
 salt: "xxxx"

config :drm, Encryption.Vault, ciphers: [
default: { Cloak.Ciphers.AES.GCM, tag: "AES.GCM.V1", key: Base.decode64!(System.get_env("ENCRYPTION_KEY")), iv_length: 12 }

## Generating a license

iex> license = %{hash: "license-key12", meta: %{email: "", name: "licensee name"}, policy: %{name: "
policy name", type: "free", expiration: nil, validation_type: "strict", checkin: false, checkin_interval: nil,
max_fingerprints: nil, fingerprint: "umbrella-app-hash-id"}} 

iex> License.create(license)

iex> License.fingerprint_valid?(license.policy.fingerprint)
This will also create an encrypted key file on the filesystem you can decide if/how you want to distribute it.

[![Inline docs](](

<a href="" target="_blank"><img src="" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>

Documentation can be generated with [ExDoc](
and published on [HexDocs]( Once published, the docs can be found
at [](