- 전체
- 안드로이드 플랫폼
- 아두이노
- 라즈베리 파이
- 안드로이드 ADK
- Embedded HardWare
- Embedded FirmWare
- Embedded Platform
- Embedded SoftWare
- 임베디드 리눅스
- Hobby Electronics
- 임베디드기사 - 국가기술자격
- VHDL 디지털설계
- M2M_IoT_사물지능통신
- 아마추어 로봇
- EDA - Electronic CAD
- 로봇공학
- 국가기술자격 로봇 제작 개발 자격증
- IoT (임베디드 인터넷)
아두이노 [아두이노 arduino] Simple encryption using XOR operator
2024.03.11 02:17
[아두이노 arduino] Simple encryption using XOR operator
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
char message[] = "Hello, World!"; // original message
char key = 'K'; // encryption key
int len = strlen(message);
for (int i = 0; i < len; i++) {
message[i] = message[i] ^ key; // XOR operation with key to encrypt character
}
// After execution, the contents of the message will be encrypted
Serial.println(message);
//복호화
for (int i = 0; i < len; i++) {
message[i] = message[i] ^ key; // XOR operation with key to encrypt character
}
// After execution, the contents of the message will be encrypted
Serial.println(message);
}
void loop() {
// put your main code here, to run repeatedly:
}
[출처] https://wokwi.com/projects/389592909529965569
[아두이노 arduino] Simple encryption using XOR operator
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
char message[] = "Hello, World!"; // original message
char key = 'K'; // encryption key
int len = strlen(message);
for (int i = 0; i < len; i++) {
message[i] = message[i] ^ key; // XOR operation with key to encrypt character
}
// After execution, the contents of the message will be encrypted
Serial.println(message);
//복호화
for (int i = 0; i < len; i++) {
message[i] = message[i] ^ key; // XOR operation with key to encrypt character
}
// After execution, the contents of the message will be encrypted
Serial.println(message);
}
void loop() {
// put your main code here, to run repeatedly:
}
[출처] https://wokwi.com/projects/389592909529965569
본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
댓글 0
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
|---|---|---|---|---|
| 3 |
[Embedded Hardware] Atmega328 보드 만들기 - 보드 납땜 및 태스트..
| 졸리운_곰 | 2022.07.13 | 492 |
| 2 |
[Embedded Hardware] Atmega128 시작 - 키트 납땜
| 졸리운_곰 | 2022.07.13 | 326 |
| 1 |
Top PCB Design Software Tools for Electronics Engineers: 46 Must-Have Tools to Streamline PCB Design
| 졸리운_곰 | 2017.07.22 | 1623 |

