This repository has been archived by the owner. It is now read-only.
Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Added basic application callback and supervisor
Restructured build process and bumped version to 0.2
- Loading branch information
Showing
9 changed files
with
155 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,25 @@ | ||
## Copyright (c) 2009 Hunter Morris <huntermorris@gmail.com> | ||
|
||
## Permission to use, copy, modify, and distribute this software for any | ||
## purpose with or without fee is hereby granted, provided that the above | ||
## copyright notice and this permission notice appear in all copies. | ||
|
||
## THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
## WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
## MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
## ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
## ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
## OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
|
||
bcryptprivlibdir = $(localerlanglibdir)/bcrypt/priv | ||
|
||
bcryptprivlib_PROGRAMS = bcrypt | ||
|
||
bcrypt_SOURCES = \ | ||
../c_src/bcrypt_erlang.c \ | ||
../c_src/blowfish.c \ | ||
../c_src/bcrypt.c \ | ||
../c_src/erl_blf.h | ||
|
||
bcrypt_LDADD = -lpthread -lerl_interface -lei |
BIN
+146 KB
lib/bcrypt/priv/bcrypt
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,37 @@ | ||
%% @author Hunter Morris <huntermorris@gmail.com> | ||
%% @copyright 2009 Hunter Morris | ||
%% | ||
%% @doc Bcrypt application callback module | ||
%% @end | ||
%% | ||
%% Permission to use, copy, modify, and distribute this software for any | ||
%% purpose with or without fee is hereby granted, provided that the above | ||
%% copyright notice and this permission notice appear in all copies. | ||
|
||
%% THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
%% WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
%% MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
%% ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
%% WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
-module(bcrypt_app). | ||
-author('Hunter Morris <huntermorris@gmail.com>'). | ||
|
||
-behaviour(application). | ||
|
||
-export([start/0, start/2, stop/1]). | ||
|
||
start() -> | ||
start(normal, []). | ||
|
||
start(normal, Args) -> | ||
case bcrypt_sup:start_link(Args) of | ||
{ok, Pid} -> | ||
{ok, Pid}; | ||
Error -> | ||
Error | ||
end. | ||
|
||
stop(_State) -> | ||
ok. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -0,0 +1,37 @@ | ||
%% @author Hunter Morris <huntermorris@gmail.com> | ||
%% @copyright 2009 Hunter Morris | ||
%% | ||
%% @doc Bcrypt supervisor | ||
%% @end | ||
%% | ||
%% Permission to use, copy, modify, and distribute this software for any | ||
%% purpose with or without fee is hereby granted, provided that the above | ||
%% copyright notice and this permission notice appear in all copies. | ||
|
||
%% THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
%% WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
%% MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
%% ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
%% WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
-module(bcrypt_sup). | ||
-author('Hunter Morris <huntermorris@gmail.com>'). | ||
|
||
-behaviour(supervisor). | ||
|
||
%% External | ||
-export([start_link/1]). | ||
|
||
%% supervisor cb | ||
-export([init/1]). | ||
|
||
start_link(Args) -> | ||
supervisor:start_link({local, ?MODULE}, ?MODULE, Args). | ||
|
||
init(_Args) -> | ||
Bcrypt = | ||
{bcrypt, {bcrypt, start_link, []}, | ||
permanent, 2000, worker, [bcrypt]}, | ||
|
||
{ok,{{one_for_one, 15, 60}, [Bcrypt]}}. |