This is the sample program that can see the decode result of barcode data on Watson IoT.

Dependencies:   AsciiFont DisplayApp GR-PEACH_video LCD_shield_config LWIPBP3595Interface_STA_for_mbed-os USBDevice

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers PassphraseAuthenticator.h Source File

PassphraseAuthenticator.h

Go to the documentation of this file.
00001 /**
00002  * @file    PassphraseAuthenticator.h
00003  * @brief   mbed CoAP Endpoint Device Management Passphrase-based Authenticator class
00004  * @author  Doug Anson
00005  * @version 1.0
00006  * @see
00007  *
00008  * Copyright (c) 2016
00009  *
00010  * Licensed under the Apache License, Version 2.0 (the "License");
00011  * you may not use this file except in compliance with the License.
00012  * You may obtain a copy of the License at
00013  *
00014  *     http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing, software
00017  * distributed under the License is distributed on an "AS IS" BASIS,
00018  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00019  * See the License for the specific language governing permissions and
00020  * limitations under the License.
00021  */
00022 
00023 #ifndef __PASSPHRASE_AUTHENTICATOR_H__
00024 #define __PASSPHRASE_AUTHENTICATOR_H__
00025 
00026 // Base class
00027 #include "mbed-connector-interface/Authenticator.h"
00028 
00029 // string support
00030 #include <string>
00031 
00032 class PassphraseAuthenticator : public Authenticator {
00033     public:
00034         /**
00035         Default constructor
00036         @param logger input logger instance
00037         @param secret input secret (passphrase)
00038         */
00039         PassphraseAuthenticator(const Logger *logger,const void *passphrase = NULL);
00040         
00041         /**
00042         Copy constructor
00043         @param resource input the BasicAuthenticator that is to be deep copied
00044         */
00045         PassphraseAuthenticator(const PassphraseAuthenticator &manager);
00046     
00047         /**
00048         Destructor
00049         */
00050         virtual ~PassphraseAuthenticator();
00051         
00052         /**
00053         Authenticate
00054         @param challenge input the challenge to authenticate with
00055         @return true - authenciated successfully, false - otherwise
00056         */
00057         virtual bool authenticate(void *challenge); 
00058     
00059     private:
00060         string coapDataToString(uint8_t *coap_data_ptr,int coap_data_ptr_length);
00061 };
00062 
00063 #endif // __PASSPHRASE_AUTHENTICATOR_H__