1
0
forked from QPQ-AG/enoise

Improve type specs

This commit is contained in:
Hans Svensson
2019-01-28 15:05:21 +01:00
parent c06bbae07d
commit 7c7ad54a6a
8 changed files with 32 additions and 13 deletions
+3 -1
View File
@@ -36,7 +36,9 @@ new(Type) ->
%% @doc Create a new keypair of type `Type'. If `Public' is `undefined'
%% it will be computed from the `Secret' (using the curve/algorithm
%% indicated by `Type').
-spec new(Type :: key_type(), Secret :: binary(), Public :: binary() | undefined) -> keypair().
-spec new(Type :: key_type(),
Secret :: binary() | undefined,
Public :: binary() | undefined) -> keypair().
new(Type, Secret, undefined) ->
new(Type, Secret, pubkey_from_secret(Type, Secret));
new(Type, Secret, Public) ->