3 Replies Latest reply on Jun 18, 2015 3:39 PM by Intel_Peter

    library sha1

    ricovi

      Hello,

       

      I want to install sha1 library in my Galileo Gen2. But when I compile errors appear.

      I have installed this libraries:

      - Cathedrow/Cryptosuite · GitHub

      - Sha.zip -  cryptosuite -  Sha library -  Cryptography suite for Arduino - Google Project Hosting

       

      This is the error:

       

      "

      done

      In file included from sha1test.pde:1:0:

      /root/Arduino/libraries/Cryptosuite-master/sha1.h:26:18: error: conflicting return type specified for 'virtual void Sha1Class::write(uint8_t)'

      In file included from /root/Arduino/libraries/Cryptosuite-master/sha1.h:5:0,

                       from sha1test.pde:1:

      /opt/arduino/hardware/intel/i586-uclibc/cores/arduino/Print.h:48:20: error:   overriding 'virtual size_t Print::write(uint8_t)'

      Error de compilación

      "

       

      Does anyone knows how to fix it?

       

       

      Thank you very much!

        • 1. Re: library sha1
          Intel_Peter

          Hello ricovi,

           

          I was checking the library to check what was happening and I found out that in sha1.cpp, it makes calls  to avr/io.h, avr/pgmspace.h.

          Those libraries are AVR exclusive, which means that they depend on the AVR architecture. Since the Galileo uses an x86 architecture, this library is not compatible with it.

          In order to make the library work with the Galileo, it'd require major modifications. I believe an easier approach for this issue is for you to write your own library based on Cathedrow/Cryptosuite, but making it compatible with the Galileo's architecture.

           

          Peter.

          • 2. Re: library sha1
            ricovi

            Hello,

             

            Thank you very much for helping me.

            I honestly wouldn't know to do a new library.

             

            Can anybody help me? or

            Does anyone know if there is a library for Galileo?


            Thank you very much!

            • 3. Re: library sha1
              Intel_Peter

              I believe you could use Cryptodev-linux module but this would be on Linux side. But you can always use a system call with the "system" command.

               

              Peter.