Coder Social home page Coder Social logo

cryptosuite's People

Contributors

cathedrow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cryptosuite's Issues

sha1 :: conflicting return type specified

In file included from ShowerWithFriends.ino:1:
/Users/george/Documents/Arduino/libraries/Sha/sha1.h:26: error: conflicting return type specified for 'virtual void Sha1Class::write(uint8_t)'
/Applications/Arduino.app/Contents/Resources/Java/hardware/arduino/cores/arduino/Print.h:48: error: overriding 'virtual size_t Print::write(uint8_t)'

A similar error happens for sha256.h

[Error Compiling] read-only variables must be const.

The compiling error message is shown below:


Arduino: 1.7.4 (Mac OS X), Board: "Arduino Uno"

In file included from /Users/../Documents/Arduino/libraries/Sha/sha256.cpp:3:0:
/Users/../Documents/Arduino/libraries/Sha/sha256.cpp:6:20: error: variable 'sha256K' must be const in order to be put into read-only section by means of 'attribute((progmem))'
uint32_t sha256K[] PROGMEM = {
^
/Users/../Documents/Arduino/libraries/Sha/sha256.cpp:19:27: error: variable 'sha256InitState' must be const in order to be put into read-only section by means of 'attribute((progmem))'
uint8_t sha256InitState[] PROGMEM = {
^

Error compiling.

Read-only variables must be const as above suggestion.
Thanks!

License undefined

Thank you for this code! It is much appreciated!
I'd like to know under which license it may be used.
A commented out header describing the license would be ideal.

Best Regards

issues with using library

I've followed the instructions on how to add this library to the Arduino IDE; and have selected a Sketch from the examples providers, however all examples result in the following :--

In file included from sha256test.pde:1:0:
C:\Users...\Documents\Arduino\libraries\Sha/sha256.h:26:18: error: conflicting return type specified for 'virtual void Sha256Class::write(uint8_t)'
virtual void write(uint8_t);
^
In file included from C:\Users...\Documents\Arduino\libraries\Sha/sha256.h:5:0,
from sha256test.pde:1:
C:\Users...\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\1.6.5-1160-gef26c5f\cores\esp8266/Print.h:55:24: error: overriding 'virtual size_t Print::write(uint8_t)'
virtual size_t write(uint8_t) = 0;
^
Error compiling.

Compatibility issues

I propose the following changes:
sha1.cpp should be changed:
void Sha1Class::write(uint8_t data) {
to:
size_t Sha1Class::write(uint8_t data) {

uint8_t sha1InitState[] PROGMEM = {
to:
const uint8_t sha1InitState[] PROGMEM = {

sha256.cpp should be changed:
uint32_t sha256K[] PROGMEM = {
to:
const uint32_t sha256K[] PROGMEM = {

uint8_t sha256InitState[] PROGMEM = {
to:
const uint8_t sha256InitState[] PROGMEM = {

Both sha1.h and sha256.h should be changed from:
virtual void write(uint8_t);
to:
virtual size_t write(uint8_t);

HMAC result different on powerup

I'm new to SH256 and HMAC.

In my loop, I have
`
void loop(void) {

uint8_t sk[32] = {0x91,0x2F,0xC9,0xA2,0x46,0x16,0xB7,0x60,0x40,0xCA,0x7A,0x81,0x44,0x22,0xFB,0xB9,0x60,0x6A,0x70,0x20,0x56,0x69,0xF7,0x12,0x19,0x5B,0xA4,0x62,0xC5,0x64,0x52,0x67};

Sha256.initHmac(sk, 32);
Sha256.print("68C63AA0F4AE");
printHash(Sha256.resultHmac());
delay(1000);

}
`
The key and message is the same, but the result is different everytime I reboot the ESP.

invalid conversion

I am using Arduino with ATMEGA 328 and the IDE is version 16.7 installed on Windows 10.
tried to run the example in the documentation. Just to create a HMAC256. I tried to verify the code in the IDE, I get this error which I do not know how to fix. Can you help.

invalid conversion from 'const char_' to 'const uint8_t_ {aka const unsigned char*}' [-fpermissive]

The Code is:

include "sha256.h"

void setup() {
// put your setup code here, to run once:
uint8_t *hash;
//static const char hash[450]={};
//const char *hash; hash={};
Sha256.initHmac("hash key",8); // key, and length of key in bytes
Sha256.print("This is a message to hash");
hash = Sha256.resultHmac();
//Serial.print(hash,HEX);
}

void loop() {
// put your main code here, to run repeatedly:

}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.