Skip to content
Browse files

move share record to include file.

  • Loading branch information...
1 parent dab8df7 commit 01a4300ed4dd838dca32e53695054b6117b9869c Robert Newson committed Aug 15, 2011
Showing with 20 additions and 6 deletions.
  1. +19 −0 include/shamir.hrl
  2. +1 −6 src/shamir.erl
View
19 include/shamir.hrl
@@ -0,0 +1,19 @@
+%% Copyright 2011 Robert Newson
+%%
+%% Licensed under the Apache License, Version 2.0 (the "License");
+%% you may not use this file except in compliance with the License.
+%% You may obtain a copy of the License at
+%%
+%% http://www.apache.org/licenses/LICENSE-2.0
+%%
+%% Unless required by applicable law or agreed to in writing, software
+%% distributed under the License is distributed on an "AS IS" BASIS,
+%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+%% See the License for the specific language governing permissions and
+%% limitations under the License.
+
+-record(share, {
+ threshold,
+ x,
+ y
+}).
View
7 src/shamir.erl
@@ -15,12 +15,7 @@
-module(shamir).
-export([share/3, recover/1]).
-
--record(share, {
- threshold,
- x,
- y
-}).
+-include("shamir.hrl").
share(Secret, Threshold, Count) when is_binary(Secret) ->
share(binary_to_list(Secret), Threshold, Count);

0 comments on commit 01a4300

Please sign in to comment.
Something went wrong with that request. Please try again.