Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contribute changes by EnviroDIY personel to main repository #26

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,12 @@ modules.order
Module.symvers
Mkfile.old
dkms.conf

# PlatformIO
.pio
/platformio.ini

# VSCode
.vscode
.clang_complete
.gcc-flags.json
7 changes: 6 additions & 1 deletion contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,14 @@
- year: 2020
descr: Moved some data from RAM to flash in the examples
- name: Christoph Honal
email:
email:
contributions:
- year: 2021
descr: Remove test sketches from the regular build on PlatformIO
- year: 2021
descr: Fix out-of-bounds memory access in SHA1 hashing
- name: Anthony Aufdenkampe
email: [email protected]
contributions:
- year: 2022
descr: Improve use with PlatformIO via `library.json` tweaks and example `plaformio.ini` files
40 changes: 29 additions & 11 deletions library.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,36 @@
{
"name": "cryptosuite2",
"keywords": "crypto, sha256, sha265-hmac, hash, sha1, sha1-hmac",
"version": "0.2.7",
"description": "Arduino/Generic C library for SHA256, SHA1 hashing and SHA256-HMAC, SHA1-HMAC",
"repository":
{
"keywords": "crypto, sha256, sha265-hmac, hash, sha1, sha1-hmac",
"platforms": "*",
"frameworks": "arduino",
"authors": [
],
"repository": {
"type": "git",
"branch": "master",
"url": "https://github.com/daknuett/cryptosuite2.git"
"url": "https://github.com/EnviroDIY/cryptosuite2.git",
"branch": "master"
},
"version": "0.2.7",
"platforms": "*",
"export": {
"include": [
"LICENSE",
"library.json",
"README.md",
"sha/*",
"sha/examples/*"
]
},
"examples": [ "sha/examples/*/*.ino" ],
"build":
{
"srcFilter": "+<*> -<.git/> -<sha/examples/> -<sha/test/> -<tools/> -<doc/> -<docs/>"
}
"build": {
"srcDir": "sha/",
"srcFilter": [
"+<*.c>",
"+<*.cpp>",
"+<*.h>"
],
"libLDFMode": "deep+"
},
"dependencies": [
]
}
54 changes: 54 additions & 0 deletions sha/examples/sha256HMAC/platformio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
; PlatformIO Project Configuration File
;
; Please visit documentation for options and examples
; http://docs.platformio.org/page/projectconf.html
;
; COPY THIS TO THE PROJECT ROOT DIRECTORY

[platformio]
description = cryptosuite2 ini for library development
default_envs = mayfly
include_dir = sha ; path to this project's header files. See http://docs.platformio.org/en/latest/projectconf/section_platformio.html#include-dir
src_dir = sha/examples/sha256HMAC

[env]
monitor_speed = 115200
framework = arduino
lib_ldf_mode = deep+
; To your `lib_extra_dirs` directory, you need to add "." (meaning the current project folder) , not "src".
; Without a "." it's searching for the library files in a src subdirectory of the lib_extra_dirs directory, so it doesn't find the library files because they're in ./src not ./src/src.
; https://community.platformio.org/t/finding-libraries-in-subfolders-submodules-on-git/1508/12
lib_extra_dirs = .
; Then you need to explicitly ignore all of the other library containing folders so they don't get compiled twice (which would also cause issues):
lib_ignore =
.git
.pio
.vscode
doc
docs
sha/examples
tools
; lib_deps =
; All these src_filter flags aren’t necessary this way because it’s actually
; finding the library.json in the main directory and that is already telling the compiler it needs those subdirectories. They don’t hurt, though.
src_filter =
+<*>
+<../../sha>
; +<../../sha/sha1>
; +<../../sha/sha256>
; build_flags =

[env:mayfly]
; upload_port = COM4
; monitor_port = COM4
board = mayfly
platform = atmelavr
lib_ignore =
${env.lib_ignore}
RTCZero
build_flags =
${env.build_flags}
; upload_flags =
; -V
lib_deps =
${env.lib_deps}
3 changes: 1 addition & 2 deletions sha/examples/sha256HMAC/sha256HMAC.ino
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const char hexMap[] PROGMEM = "0123456789abcdef";
void setup(void)
{
Serial.begin(9600);
Serial.begin(115200);

// this is actually the RFC4231 4.3 test

Expand All @@ -23,4 +23,3 @@ void setup(void)

void loop(void)
{}