OpenZWave Library  1.6.897
ZWSecurity.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------------
2 //
3 // ZWSecurity.h
4 //
5 // Common Security/Encryption Routines
6 //
7 // Copyright (c) 2015 Justin Hammond <justin@dynam.ac>
8 //
9 // SOFTWARE NOTICE AND LICENSE
10 //
11 // This file is part of OpenZWave.
12 //
13 // OpenZWave is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU Lesser General Public License as published
15 // by the Free Software Foundation, either version 3 of the License,
16 // or (at your option) any later version.
17 //
18 // OpenZWave is distributed in the hope that it will be useful,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU Lesser General Public License for more details.
22 //
23 // You should have received a copy of the GNU Lesser General Public License
24 // along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
25 //
26 //-----------------------------------------------------------------------------
27 
28 #ifndef SECURITY_H_
29 #define SECURITY_H_
30 
31 #include <cstdio>
32 #include <string>
33 #include <string.h>
34 #include "Defs.h"
35 #include "Driver.h"
36 
37 namespace OpenZWave
38 {
39  namespace Internal
40  {
41  bool EncyrptBuffer(uint8 *m_buffer, uint8 m_length, Driver *driver, uint8 const _sendingNode, uint8 const _receivingNode, uint8 const m_nonce[8], uint8* e_buffer);
42  bool DecryptBuffer(uint8 *e_buffer, uint8 e_length, Driver *driver, uint8 const _sendingNode, uint8 const _receivingNode, uint8 const m_nonce[8], uint8* m_buffer);
43  bool GenerateAuthentication(uint8 const* _data, uint32 const _length, Driver *driver, uint8 const _sendingNode, uint8 const _receivingNode, uint8 *iv, uint8* _authentication);
45  {
48  };
50 
51  } // namespace Internal
52 } // namespace OpenZWave
53 
54 #endif /* SECURITY_H_ */
Definition: Bitfield.cpp:30
bool EncyrptBuffer(uint8 *m_buffer, uint8 m_length, Driver *driver, uint8 const _sendingNode, uint8 const _receivingNode, uint8 const m_nonce[8], uint8 *e_buffer)
Definition: ZWSecurity.cpp:135
bool DecryptBuffer(uint8 *e_buffer, uint8 e_length, Driver *driver, uint8 const _sendingNode, uint8 const _receivingNode, uint8 const m_nonce[8], uint8 *m_buffer)
Definition: ZWSecurity.cpp:270
SecurityStrategy ShouldSecureCommandClass(uint8 CommandClass)
Definition: ZWSecurity.cpp:356
unsigned int uint32
Definition: Defs.h:92
bool GenerateAuthentication(uint8 const *_data, uint32 const _length, Driver *driver, uint8 const _sendingNode, uint8 const _receivingNode, uint8 *iv, uint8 *_authentication)
Definition: ZWSecurity.cpp:49
SecurityStrategy
Definition: ZWSecurity.h:44
unsigned char uint8
Definition: Defs.h:86