From 798d7d7281331a477edf847bef565b80a4a9adf2 Mon Sep 17 00:00:00 2001
From: Dmitriy Gerasimov <dm@cifercom.com>
Date: Sun, 14 Jan 2018 22:49:24 +0700
Subject: [PATCH] [+] Copytright headers, pragma once [+] Wallet delcarations

---
 dap_chain.c                 |  9 +++-
 dap_chain.h                 |  1 +
 dap_chain_block.c           |  9 +++-
 dap_chain_block_txs.c       | 23 +++++++++++
 dap_chain_block_txs.h       | 24 +++++++++++
 dap_chain_coin.c            | 24 +++++++++++
 dap_chain_common.h          |  1 -
 dap_chain_section.c         |  8 +++-
 dap_chain_section_roots.c   |  9 +++-
 dap_chain_section_tx.c      | 24 +++++++++++
 dap_chain_srv.c             | 26 ++++++++++++
 dap_chain_srv.h             |  1 +
 dap_chain_wallet.c          | 82 +++++++++++++++++++++++++++++++++++++
 dap_chain_wallet.h          | 15 +++++++
 dap_chain_wallet_internal.h | 41 +++++++++++++++++++
 dap_hash.c                  | 24 +++++++++++
 dap_hash.h                  | 27 ++++++++++--
 dap_hash_fusion.c           | 24 +++++++++++
 dap_hash_fusion.h           | 26 ++++++++++--
 dap_hash_keccak.c           | 26 ++++++++++++
 dap_hash_keccak.h           | 24 +++++++++++
 dap_hash_slow.c             | 25 +++++++++++
 dap_hash_slow.h             | 28 +++++++++++--
 23 files changed, 483 insertions(+), 18 deletions(-)

diff --git a/dap_chain.c b/dap_chain.c
index 282a01f..d4452a1 100644
--- a/dap_chain.c
+++ b/dap_chain.c
@@ -1,6 +1,10 @@
 /*
- Copyright (c) 2017-2018 (c) Project "DeM Labs Inc" https://github.com/demlabsinc
-  All rights reserved.
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
 
  This file is part of DAP (Deus Applications Prototypes) the open source project
 
@@ -19,6 +23,7 @@
 */
 
 
+
 #include "dap_chain_internal.h"
 #include "dap_chain.h"
 
diff --git a/dap_chain.h b/dap_chain.h
index 0f40cec..5e06a5d 100644
--- a/dap_chain.h
+++ b/dap_chain.h
@@ -21,6 +21,7 @@
     You should have received a copy of the GNU General Public License
     along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
 */
+
 #pragma once
 #include "dap_chain_block.h"
 
diff --git a/dap_chain_block.c b/dap_chain_block.c
index bc4f083..09f95ad 100644
--- a/dap_chain_block.c
+++ b/dap_chain_block.c
@@ -1,6 +1,10 @@
 /*
- Copyright (c) 2017-2018 (c) Project "DeM Labs Inc" https://github.com/demlabsinc
-  All rights reserved.
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
 
  This file is part of DAP (Deus Applications Prototypes) the open source project
 
@@ -18,6 +22,7 @@
     along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+
 #include "dap_common.h"
 
 #include "dap_chain_block.h"
diff --git a/dap_chain_block_txs.c b/dap_chain_block_txs.c
index e69de29..a672942 100644
--- a/dap_chain_block_txs.c
+++ b/dap_chain_block_txs.c
@@ -0,0 +1,23 @@
+/*
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
+
+ This file is part of DAP (Deus Applications Prototypes) the open source project
+
+    DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    DAP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
+*/
diff --git a/dap_chain_block_txs.h b/dap_chain_block_txs.h
index e69de29..8bf7f08 100644
--- a/dap_chain_block_txs.h
+++ b/dap_chain_block_txs.h
@@ -0,0 +1,24 @@
+/*
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
+
+ This file is part of DAP (Deus Applications Prototypes) the open source project
+
+    DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    DAP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#pragma once
diff --git a/dap_chain_coin.c b/dap_chain_coin.c
index e69de29..3ceff1d 100644
--- a/dap_chain_coin.c
+++ b/dap_chain_coin.c
@@ -0,0 +1,24 @@
+/*
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
+
+ This file is part of DAP (Deus Applications Prototypes) the open source project
+
+    DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    DAP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#include "dap_chain_coin.h"
diff --git a/dap_chain_common.h b/dap_chain_common.h
index b9a9c8c..81a0699 100644
--- a/dap_chain_common.h
+++ b/dap_chain_common.h
@@ -35,7 +35,6 @@ typedef union dap_chain_hash{
     uint8_t data[DAP_CHAIN_HASH_SIZE];
 } dap_chain_hash_t;
 
-
 typedef union dap_chain_sig_type{
     enum {
         SIG_TYPE_NEWHOPE = 0x0000,
diff --git a/dap_chain_section.c b/dap_chain_section.c
index 8264ee3..fd3af36 100644
--- a/dap_chain_section.c
+++ b/dap_chain_section.c
@@ -1,6 +1,10 @@
 /*
- Copyright (c) 2017-2018 (c) Project "DeM Labs Inc" https://github.com/demlabsinc
-  All rights reserved.
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
 
  This file is part of DAP (Deus Applications Prototypes) the open source project
 
diff --git a/dap_chain_section_roots.c b/dap_chain_section_roots.c
index 56382e0..fa093bf 100644
--- a/dap_chain_section_roots.c
+++ b/dap_chain_section_roots.c
@@ -1,6 +1,10 @@
 /*
- Copyright (c) 2017-2018 (c) Project "DeM Labs Inc" https://github.com/demlabsinc
-  All rights reserved.
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
 
  This file is part of DAP (Deus Applications Prototypes) the open source project
 
@@ -18,6 +22,7 @@
     along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
 */
 
+
 #include "dap_common.h"
 #include "dap_chain_section_roots.h"
 
diff --git a/dap_chain_section_tx.c b/dap_chain_section_tx.c
index 7410701..39e0e02 100644
--- a/dap_chain_section_tx.c
+++ b/dap_chain_section_tx.c
@@ -1,3 +1,27 @@
+/*
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
+
+ This file is part of DAP (Deus Applications Prototypes) the open source project
+
+    DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    DAP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
 #include "dap_common.h"
 #include "dap_chain_section_tx.h"
 
diff --git a/dap_chain_srv.c b/dap_chain_srv.c
index e69de29..ca69d99 100644
--- a/dap_chain_srv.c
+++ b/dap_chain_srv.c
@@ -0,0 +1,26 @@
+/*
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
+
+ This file is part of DAP (Deus Applications Prototypes) the open source project
+
+    DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    DAP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "dap_chain_srv.h"
+
diff --git a/dap_chain_srv.h b/dap_chain_srv.h
index a672942..8bf7f08 100644
--- a/dap_chain_srv.h
+++ b/dap_chain_srv.h
@@ -21,3 +21,4 @@
     You should have received a copy of the GNU General Public License
     along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
 */
+#pragma once
diff --git a/dap_chain_wallet.c b/dap_chain_wallet.c
index e69de29..8532775 100644
--- a/dap_chain_wallet.c
+++ b/dap_chain_wallet.c
@@ -0,0 +1,82 @@
+/*
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
+
+ This file is part of DAP (Deus Applications Prototypes) the open source project
+
+    DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    DAP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "dap_common.h"
+#include "dap_chain_wallet.h"
+#include "dap_chain_wallet_internal.h"
+
+#define LOG_TAG "dap_chain_wallet"
+
+/**
+ * @brief dap_chain_wallet_open
+ * @param a_file_name
+ * @param a_sig_type
+ * @details Creates new one if not found
+ * @return Wallet, new wallet or NULL if errors
+ */
+dap_chain_wallet_t * dap_chain_wallet_open(const char * a_file_name, dap_chain_sig_type_t a_sig_type)
+{
+    dap_chain_wallet_t * l_wallet = DAP_NEW_Z(dap_chain_wallet_t);
+    DAP_CHAIN_WALLET_INTERNAL_LOCAL_NEW(l_wallet);
+    return l_wallet;
+}
+
+/**
+ * @brief dap_chain_wallet_close
+ * @param a_wallet
+ */
+void dap_chain_wallet_close( dap_chain_wallet_t * a_wallet)
+{
+    DAP_CHAIN_WALLET_INTERNAL_LOCAL(a_wallet);
+    DAP_DELETE(l_wallet_internal);
+    DAP_DELETE(a_wallet);
+}
+
+/**
+ * @brief dap_chain_wallet_get_pkey
+ * @param a_wallet
+ * @param a_pkey
+ * @param a_pkey_size_max
+ * @return 0 if everything is ok, negative value if error
+ */
+int dap_chain_wallet_get_pkey( dap_chain_wallet_t * a_wallet, void * a_pkey, size_t a_pkey_size_max)
+{
+    return 0;
+}
+
+/**
+ * @brief dap_chain_wallet_sign
+ * @param a_wallet
+ * @param a_data
+ * @param a_data_size
+ * @param a_sign
+ * @param a_sign_size_max
+ * @return 0 if everything is ok, negative value if error
+ */
+int dap_chain_wallet_sign( dap_chain_wallet_t * a_wallet, const void * a_data, size_t a_data_size,
+                           void * a_sign, size_t a_sign_size_max)
+{
+
+    return 0;
+}
diff --git a/dap_chain_wallet.h b/dap_chain_wallet.h
index a672942..c0ebad5 100644
--- a/dap_chain_wallet.h
+++ b/dap_chain_wallet.h
@@ -21,3 +21,18 @@
     You should have received a copy of the GNU General Public License
     along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
 */
+
+#pragma once
+#include "dap_chain_common.h"
+typedef struct dap_chain_wallet{
+    void * _internal;
+    void * _inheritor;
+} dap_chain_wallet_t;
+
+dap_chain_wallet_t * dap_chain_wallet_open(const char * a_file_name, dap_chain_sig_type_t a_sig_type); // Creates new one if not found
+void dap_chain_wallet_close( dap_chain_wallet_t * a_wallet);
+
+int dap_chain_wallet_get_pkey( dap_chain_wallet_t * a_wallet, void * a_pkey, size_t a_pkey_size_max);
+
+int dap_chain_wallet_sign( dap_chain_wallet_t * a_wallet, const void * a_data, size_t a_data_size, void * a_sign, size_t a_sign_size_max);
+
diff --git a/dap_chain_wallet_internal.h b/dap_chain_wallet_internal.h
index e69de29..4a5950b 100644
--- a/dap_chain_wallet_internal.h
+++ b/dap_chain_wallet_internal.h
@@ -0,0 +1,41 @@
+/*
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
+
+ This file is part of DAP (Deus Applications Prototypes) the open source project
+
+    DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    DAP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "dap_chain_common.h"
+
+#include "dap_chain_wallet.h"
+
+typedef struct dap_chain_wallet_internal
+{
+    dap_chain_addr_t addr;
+    char * file_name;
+} dap_chain_wallet_internal_t;
+
+#define DAP_CHAIN_WALLET_INTERNAL(a) ((dap_chain_wallet_internal_t *) a->_internal  )
+
+#define DAP_CHAIN_WALLET_INTERNAL_LOCAL(a) dap_chain_wallet_internal_t * l_wallet_internal = DAP_CHAIN_WALLET_INTERNAL(a)
+
+#define DAP_CHAIN_WALLET_INTERNAL_LOCAL_NEW(a) dap_chain_wallet_internal_t * l_wallet_internal = DAP_NEW_Z(dap_chain_wallet_internal_t); a->_internal = l_wallet_internal
diff --git a/dap_hash.c b/dap_hash.c
index c8d3a7f..cb43963 100644
--- a/dap_hash.c
+++ b/dap_hash.c
@@ -1,3 +1,27 @@
+/*
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
+
+ This file is part of DAP (Deus Applications Prototypes) the open source project
+
+    DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    DAP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
 #include "dap_common.h"
 #include "dap_hash.h"
 
diff --git a/dap_hash.h b/dap_hash.h
index a3b5756..5918195 100644
--- a/dap_hash.h
+++ b/dap_hash.h
@@ -1,5 +1,27 @@
-#ifndef _DAP_HASH_H_
-#define _DAP_HASH_H_
+/*
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
+
+ This file is part of DAP (Deus Applications Prototypes) the open source project
+
+    DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    DAP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
+*/
+#pragma once
 #include <stddef.h>
 
 #include "dap_hash_slow.h"
@@ -27,4 +49,3 @@ inline void dap_hash(void * a_data_in, size_t a_data_in_size,
     }
 
 }
-#endif
diff --git a/dap_hash_fusion.c b/dap_hash_fusion.c
index e1a46ee..a6e107f 100644
--- a/dap_hash_fusion.c
+++ b/dap_hash_fusion.c
@@ -1,3 +1,27 @@
+/*
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
+
+ This file is part of DAP (Deus Applications Prototypes) the open source project
+
+    DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    DAP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
 #include "dap_common.h"
 #include "dap_hash_fusion.h"
 
diff --git a/dap_hash_fusion.h b/dap_hash_fusion.h
index 12346aa..a2d8d85 100644
--- a/dap_hash_fusion.h
+++ b/dap_hash_fusion.h
@@ -1,5 +1,25 @@
-#ifndef _DAP_HASH_FUSION_H_
-#define _DAP_HASH_FUSION_H_
+/*
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
 
+ This file is part of DAP (Deus Applications Prototypes) the open source project
 
-#endif
+    DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    DAP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
diff --git a/dap_hash_keccak.c b/dap_hash_keccak.c
index e69de29..03695a7 100644
--- a/dap_hash_keccak.c
+++ b/dap_hash_keccak.c
@@ -0,0 +1,26 @@
+/*
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
+
+ This file is part of DAP (Deus Applications Prototypes) the open source project
+
+    DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    DAP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "dap_hash_keccak.h"
+
diff --git a/dap_hash_keccak.h b/dap_hash_keccak.h
index 6381fe4..890d9e0 100644
--- a/dap_hash_keccak.h
+++ b/dap_hash_keccak.h
@@ -1,3 +1,27 @@
+/*
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
+
+ This file is part of DAP (Deus Applications Prototypes) the open source project
+
+    DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    DAP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
 #pragma once
 #include "keccak.h"
 
diff --git a/dap_hash_slow.c b/dap_hash_slow.c
index e69de29..38902a6 100644
--- a/dap_hash_slow.c
+++ b/dap_hash_slow.c
@@ -0,0 +1,25 @@
+/*
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
+
+ This file is part of DAP (Deus Applications Prototypes) the open source project
+
+    DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    DAP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "dap_hash_slow.h"
diff --git a/dap_hash_slow.h b/dap_hash_slow.h
index 61a9052..27d2604 100644
--- a/dap_hash_slow.h
+++ b/dap_hash_slow.h
@@ -1,5 +1,28 @@
-#ifndef _DAP_HASH_SLOW_H_
-#define _DAP_HASH_SLOW_H_
+/*
+ * Authors:
+ * Dmitriy A. Gearasimov <kahovski@gmail.com>
+ * DeM Labs Inc.   https://demlabs.net
+ * DeM Labs Open source community https://github.com/demlabsinc
+ * Copyright  (c) 2017-2018
+ * All rights reserved.
+
+ This file is part of DAP (Deus Applications Prototypes) the open source project
+
+    DAP (Deus Applicaions Prototypes) is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    DAP is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with any DAP based project.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
 
 #include "hash-ops.h"
 
@@ -18,4 +41,3 @@ inline void dap_hash_slow(const void *a_in, size_t a_in_length, char * a_out)
 
 inline size_t dap_hash_slow_size() { return DAP_HASH_SLOW_SIZE; }
 //cn_slow_hash(data, length, reinterpret_cast<char *>(&hash));
-#endif
-- 
GitLab