AuthenticationSecure.h
Go to the documentation of this file.
1 // -- BEGIN LICENSE BLOCK ----------------------------------------------
20 // -- END LICENSE BLOCK ------------------------------------------------
21 
22 #pragma once
23 #include "SafeVisionaryControl.h"
24 #include <array>
25 
26 namespace visionary {
27 
29 {
30  std::array<std::uint8_t, 16> challenge;
31  std::array<std::uint8_t, 16> salt;
32 };
33 
34 typedef std::array<std::uint8_t, 32> PasswordHash;
35 typedef std::array<std::uint8_t, 32> ChallengeResponse;
36 
37 
39 {
40 public:
42  virtual ~AuthenticationSecure();
43 
44  virtual bool login(UserLevel userLevel, const std::string& password);
45  virtual bool logout();
46 
47 private:
49 
51  const std::string& password,
52  const ChallengeRequest& challengeRequest);
54  const std::string& password,
55  const ChallengeRequest& challengeRequest);
56 };
57 
58 } // namespace visionary
visionary::AuthenticationSecure::CreatePasswortHash
PasswordHash CreatePasswortHash(UserLevel userLevel, const std::string &password, const ChallengeRequest &challengeRequest)
Definition: AuthenticationSecure.cpp:48
visionary::IAuthentication::UserLevel
UserLevel
Available CoLa user levels.
Definition: IAuthentication.h:31
visionary
Definition: AuthenticationLegacy.h:25
visionary::AuthenticationSecure::logout
virtual bool logout()
Definition: AuthenticationSecure.cpp:183
visionary::ChallengeRequest::salt
std::array< std::uint8_t, 16 > salt
Definition: AuthenticationSecure.h:31
visionary::ChallengeResponse
std::array< std::uint8_t, 32 > ChallengeResponse
Definition: AuthenticationSecure.h:35
SafeVisionaryControl.h
visionary::AuthenticationSecure::AuthenticationSecure
AuthenticationSecure(SafeVisionaryControl &vctrl)
Definition: AuthenticationSecure.cpp:41
visionary::PasswordHash
std::array< std::uint8_t, 32 > PasswordHash
Definition: AuthenticationSecure.h:34
visionary::IAuthentication
Definition: IAuthentication.h:27
visionary::ChallengeRequest::challenge
std::array< std::uint8_t, 16 > challenge
Definition: AuthenticationSecure.h:30
visionary::AuthenticationSecure::m_VisionaryControl
SafeVisionaryControl & m_VisionaryControl
Definition: AuthenticationSecure.h:48
visionary::ChallengeRequest
Definition: AuthenticationSecure.h:28
visionary::SafeVisionaryControl
Definition: SafeVisionaryControl.h:34
visionary::AuthenticationSecure::~AuthenticationSecure
virtual ~AuthenticationSecure()
Definition: AuthenticationSecure.cpp:46
visionary::AuthenticationSecure
Definition: AuthenticationSecure.h:38
visionary::AuthenticationSecure::CreateChallengeResponse
ChallengeResponse CreateChallengeResponse(UserLevel userLevel, const std::string &password, const ChallengeRequest &challengeRequest)
Definition: AuthenticationSecure.cpp:103
visionary::AuthenticationSecure::login
virtual bool login(UserLevel userLevel, const std::string &password)
Definition: AuthenticationSecure.cpp:120


sick_safevisionary_base
Author(s):
autogenerated on Sat Oct 21 2023 02:24:26