Skip to content

Commit e06e139

Browse files
committed
arduino-ci
1 parent 6e8a962 commit e06e139

36 files changed

+100
-56
lines changed

.github/workflows/arduino-ci.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Arduino CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
9+
jobs:
10+
arduino:
11+
strategy:
12+
matrix:
13+
arduino-platform: ["arduino:samd", "esp32:esp32"]
14+
include:
15+
- arduino-platform: "arduino:samd"
16+
fqbn: "arduino:samd:nano_33_iot"
17+
- arduino-platform: "esp32:esp32"
18+
fqbn: "esp32:esp32:nodemcu-32s"
19+
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v3
24+
25+
- name: Arduino Lint
26+
uses: arduino/arduino-lint-action@v1
27+
28+
- name: Install Arduino CLI
29+
uses: arduino/setup-arduino-cli@v1
30+
31+
- name: Add ESP32 package index URL
32+
run: arduino-cli config add board_manager.additional_urls https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
33+
34+
- name: Install platform
35+
run: |
36+
arduino-cli core update-index
37+
arduino-cli core install ${{ matrix.arduino-platform }}
38+
39+
- name: Build examples with Arduino
40+
uses: Arduino-CI/action@stable-1.x
41+
42+
# - name: Compile Sketch
43+
# run: arduino-cli compile --fqbn ${{ matrix.fqbn }} ./blink
44+

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set(CMAKE_CXX_STANDARD 11)
99
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
1010

1111
project(
12-
ArduinoPSA
12+
PSACrypto
1313
VERSION 1.0
1414
LANGUAGES C CXX
1515
)

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# ArduinoPSA Library
1+
# PSACrypto Library
22

33
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
44
[![GitHub release](https://img.shields.io/github/release/machinefi/arduino-psa.svg)](https://github.com/machinefi/arduino-psa/releases)
55
[![GitHub CI](https://github.com/machinefi/arduino-psa/actions/workflows/ci.yml/badge.svg)](https://github.com/machinefi/arduino-psa/actions/workflows/ci.yml)
66

7-
ArduinoPSA is an Arduino library that implements the cryptography functionality of the Platform Security Architecture (PSA) API. It provides a standardized and easy-to-use interface for cryptographic operations on Arduino boards, ensuring secure communication, data integrity, and confidentiality.
7+
PSACrypto is an Arduino library that implements the cryptography functionality of the Platform Security Architecture (PSA) API. It provides a standardized and easy-to-use interface for cryptographic operations on Arduino boards, ensuring secure communication, data integrity, and confidentiality.
88

99
## Features
1010

@@ -18,58 +18,58 @@ ArduinoPSA is an Arduino library that implements the cryptography functionality
1818

1919
### Arduino IDE
2020

21-
To install the ArduinoPSA library using the Arduino IDE, follow these steps:
21+
To install the PSACrypto library using the Arduino IDE, follow these steps:
2222

2323
1. Open the Arduino IDE.
2424
2. Go to **Sketch > Include Library > Manage Libraries**.
2525
3. The Library Manager window will open, showing a list of available libraries.
26-
4. In the search bar, type "ArduinoPSA" and press Enter.
27-
5. Locate the "ArduinoPSA" library in the search results.
26+
4. In the search bar, type "PSACrypto" and press Enter.
27+
5. Locate the "PSACrypto" library in the search results.
2828
6. Click on the library entry to open its details.
2929
7. Click the "Install" button to install the library.
3030
8. Wait for the installation process to complete.
3131
9. After installation, close the Library Manager window.
32-
10. The ArduinoPSA library is now installed and ready to be used.
32+
10. The PSACrypto library is now installed and ready to be used.
3333

3434
### Manual Installation
3535

36-
To install the ArduinoPSA library manually, follow these steps:
36+
To install the PSACrypto library manually, follow these steps:
3737

38-
1. Download the ArduinoPSA library from the [GitHub repository](https://github.com/machinefi/arduino-psa).
38+
1. Download the PSACrypto library from the [GitHub repository](https://github.com/machinefi/arduino-psa).
3939
2. Extract the downloaded ZIP file.
40-
3. Rename the extracted folder to "ArduinoPSA".
41-
4. Move the "ArduinoPSA" folder to your Arduino libraries directory. The default locations are:
40+
3. Rename the extracted folder to "PSACrypto".
41+
4. Move the "PSACrypto" folder to your Arduino libraries directory. The default locations are:
4242
- **Windows**: `Documents\Arduino\libraries`
4343
- **Mac**: `Documents/Arduino/libraries`
4444
- **Linux**: `Arduino/libraries`
4545
5. Restart the Arduino IDE.
46-
6. The ArduinoPSA library should now be available under **Sketch > Include Library** menu.
46+
6. The PSACrypto library should now be available under **Sketch > Include Library** menu.
4747
7. You can now include the library in your Arduino sketches and use its features.
4848

4949
### PlatformIO
5050

51-
To install the ArduinoPSA library using PlatformIO, follow these steps:
51+
To install the PSACrypto library using PlatformIO, follow these steps:
5252

5353
1. Create a new PlatformIO project or open an existing one.
5454
2. Open the `platformio.ini` file located in the root of your project.
5555
3. Add the following line to the `[env:<your_board>]` section:
5656

5757
```ini
5858
lib_deps =
59-
ArduinoPSA
59+
PSACrypto
6060
```
6161

6262
Replace <your_board> with the target board/platform for your project (e.g., esp32, arduino_due, etc.).
6363

6464
1. Save the platformio.ini file.
65-
2. PlatformIO will automatically install the ArduinoPSA library and its dependencies when you build/upload your project.
65+
2. PlatformIO will automatically install the PSACrypto library and its dependencies when you build/upload your project.
6666

6767
## Usage
6868

6969
### Arduino IDE
7070

7171
1. Open the Arduino IDE.
72-
2. Go to File > Examples > ArduinoPSA to access the example sketches.
72+
2. Go to File > Examples > PSACrypto to access the example sketches.
7373
3. Select an example sketch to open it.
7474
4. Modify the sketch as needed to fit your requirements.
7575
5. Upload the sketch to your Arduino board.
@@ -80,24 +80,24 @@ Replace <your_board> with the target board/platform for your project (e.g., esp3
8080
1. Open your PlatformIO project.
8181
2. Navigate to the src folder.
8282
3. Create a new .cpp file or open an existing one.
83-
4. Include the ArduinoPSA library by adding the following line at the top of your file:
83+
4. Include the PSACrypto library by adding the following line at the top of your file:
8484

8585
```c++
86-
# include <ArduinoPSA.h>
86+
# include <psacrypto.h>
8787
```
8888

89-
For detailed information on using the ArduinoPSA library, including usage examples and API reference, please refer to the [Documentation](docs/).
89+
For detailed information on using the PSACrypto library, including usage examples and API reference, please refer to the [Documentation](docs/).
9090

9191
## Compatible Hardware
9292

93-
The ArduinoPSA library has been tested and is compatible with the following hardware:
93+
The PSACrypto library has been tested and is compatible with the following hardware:
9494

9595
- ESP32
9696
- Arduino Nano 33 IoT
9797

9898
Please note that the library may also work with other Arduino-compatible boards, but it has specifically been tested and verified with the above-mentioned hardware.
9999

100-
It's recommended to check the official documentation of your specific board or consult the manufacturer's specifications to ensure compatibility with the ArduinoPSA library.
100+
It's recommended to check the official documentation of your specific board or consult the manufacturer's specifications to ensure compatibility with the PSACrypto library.
101101

102102
## Contributing
103103

examples/Aes/Aes.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "arduinopsa.h"
1+
#include "psacrypto.h"
22

33
void setup()
44
{

examples/AesMultipart/AesMultipart.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "arduinopsa.h"
1+
#include "psacrypto.h"
22

33
void setup()
44
{

examples/GenerateKey/GenerateKey.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "arduinopsa.h"
1+
#include "psacrypto.h"
22

33
void setup()
44
{

examples/GenerateRandom/GenerateRandom.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "arduinopsa.h"
1+
#include "psacrypto.h"
22

33
void setup()
44
{

examples/Hash/Hash.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "arduinopsa.h"
1+
#include "psacrypto.h"
22

33
void setup()
44
{

examples/HashMultipart/HashMultipart.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "arduinopsa.h"
1+
#include "psacrypto.h"
22

33
void setup()
44
{

examples/SignMessage/SignMessage.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "arduinopsa.h"
1+
#include "psacrypto.h"
22

33
void setup() {
44
Serial.begin(115200);

library.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "ArduinoPSA",
3-
"description": "A simple PSA-API client implementation in C++ for the IoTeX blockchain.",
2+
"name": "PSACrypto",
3+
"description": "An implementation of the Platform Security Architecture Crypto API for Arduino.",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/machinefi/arduino-psa"

library.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name=ArduinoPSA
1+
name=PSACrypto
22
version=0.1.0
33
author=IoTeX
44
maintainer=IoTeX
55
sentence=An implementation of the Platform Security Architecture Crypto API for Arduino.
6-
paragraph=ArduinoPSA is a library that provides an implementation of the Platform Security Architecture (PSA) Crypto API for Arduino boards. It enables developers to securely perform cryptographic operations on Arduino devices, such as encryption, decryption, hashing, and more. The library is designed to be easy to use and compatible with various Arduino boards.
6+
paragraph=PSACrypto is a library that provides an implementation of the Platform Security Architecture (PSA) Crypto API for Arduino boards. It enables developers to securely perform cryptographic operations on Arduino devices, such as encryption, decryption, hashing, and more. The library is designed to be easy to use and compatible with various Arduino boards.
77
category=Communication
88
url=https://github.com/machinefi/arduino-psa
99
architectures=*
10-
includes=arduinopsa.h
10+
includes=psacrypto.h

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "ArduinoPsa",
2+
"name": "PSACrypto",
33
"version": "0.3.1",
44
"description": "A simple PSA-API client implementation in C++ for the IoTeX blockchain.",
55
"main": "",
File renamed without changes.

tests/test_psa_cipher_decrypt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaCipherDecrypt : public ::testing::Test {

tests/test_psa_cipher_decrypt_setup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaCipherDecryptSetup : public ::testing::Test {

tests/test_psa_cipher_encrypt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaCipherEncrypt : public ::testing::Test {

tests/test_psa_cipher_encrypt_setup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaCipherEncryptSetup : public ::testing::Test {

tests/test_psa_cipher_generate_iv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaCipherGenerateIv : public ::testing::Test {

tests/test_psa_cipher_update.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaCipherUpdate : public ::testing::Test {

tests/test_psa_copy_key.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaCopyKey : public ::testing::Test {

tests/test_psa_crypto_init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaCryptoInitTest : public ::testing::Test {

tests/test_psa_destroy_key.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaDestroyKey : public ::testing::Test {

tests/test_psa_export_key.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaExportKey : public ::testing::Test {

tests/test_psa_export_public_key.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#include <gtest/gtest.h>
22
#include <string>
33
#include <algorithm>
4-
#include "arduinopsa.h"
4+
#include "psacrypto.h"
55
#include "test_helpers.h"
66

77
class PsaExportPublicKey : public ::testing::Test {

tests/test_psa_generate_key.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaGenerateKey : public ::testing::Test {

tests/test_psa_generate_random.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaGenerateRandomTest : public ::testing::Test {

tests/test_psa_hash_abort.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaHashAbort : public ::testing::Test {

tests/test_psa_hash_clone.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaHashClone : public ::testing::Test {

tests/test_psa_hash_compare.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaHashCompare : public ::testing::Test {

tests/test_psa_hash_compute.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaHashCompute : public ::testing::Test {

tests/test_psa_hash_finish.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaHashFinish : public ::testing::Test {

tests/test_psa_hash_setup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaHashSetup : public ::testing::Test {

tests/test_psa_hash_update.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaHashUpdate : public ::testing::Test {

tests/test_psa_hash_verify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaHashVerify : public ::testing::Test {

tests/test_psa_import_key.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#include <gtest/gtest.h>
2-
#include "arduinopsa.h"
2+
#include "psacrypto.h"
33
#include "test_helpers.h"
44

55
class PsaImportKey : public ::testing::Test {

0 commit comments

Comments
 (0)