Packages

This is a Elixir lib for generating captcha. No dependencies. It drawing captcha image with C code. This is a hijacking of https://github.com/davidqhr/elixir-captcha due to inactivity.

Current section

Files

Jump to
ex_captcha lib ex_captcha.ex
Raw

lib/ex_captcha.ex

defmodule ExCaptcha do
@moduledoc """
"""
def get do
case System.cmd(Application.app_dir(:ex_captcha, "priv/captcha"), []) do
{data, 0} ->
<<text::bytes-size(5), img::binary>> = data
{:ok, text, img}
_other ->
:error
end
end
end