Arduino: how can i use the md5 library?

Created on 2 Jan 2016  路  4Comments  路  Source: esp8266/Arduino

is it implemented?

i see theres a md5 library but no examples in how to use it?

Most helpful comment

Here are the functions

    void begin(void);
    void add(uint8_t * data, uint16_t len);
    void add(const char * data){ add((uint8_t*)data, strlen(data)); }
    void add(char * data){ add((const char*)data); }
    void add(String data){ add(data.c_str()); }
    void addHexString(const char * data);
    void addHexString(char * data){ addHexString((const char*)data); }
    void addHexString(String data){ addHexString(data.c_str()); }
    bool addStream(Stream & stream, int len);
    void calculate(void);
    void getBytes(uint8_t * output);
    void getChars(char * output);

example

MD5Builder md5;
md5.begin();
md5.add("blah blah blah blah blah blah");
md5.calculate();
Serial.println(md5.toString()); // can be getChars() to getBytes() too. (16 chars) .. see above 

quite easy.

All 4 comments

Here are the functions

    void begin(void);
    void add(uint8_t * data, uint16_t len);
    void add(const char * data){ add((uint8_t*)data, strlen(data)); }
    void add(char * data){ add((const char*)data); }
    void add(String data){ add(data.c_str()); }
    void addHexString(const char * data);
    void addHexString(char * data){ addHexString((const char*)data); }
    void addHexString(String data){ addHexString(data.c_str()); }
    bool addStream(Stream & stream, int len);
    void calculate(void);
    void getBytes(uint8_t * output);
    void getChars(char * output);

example

MD5Builder md5;
md5.begin();
md5.add("blah blah blah blah blah blah");
md5.calculate();
Serial.println(md5.toString()); // can be getChars() to getBytes() too. (16 chars) .. see above 

quite easy.

and how can you change the key?

What key ?

It's just as hash that's barely better than sum(1) for crypto purposes.

well i tought that md5 had a key to cypher and uncypher, im new to this concept sorry. i guess there is no way to uncypher incoming text.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gosewski picture gosewski  路  3Comments

Geend picture Geend  路  3Comments

mechanic98 picture mechanic98  路  3Comments

horendus picture horendus  路  3Comments

markusschweitzer picture markusschweitzer  路  3Comments