[아두이노 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

 

 

 

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

[아두이노 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

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
93 [아두이노 arduino] Run a Virtual Factory with Arduino! : 아두이노로 가상 공장을 운영해보세요! file 졸리운_곰 2024.12.28 116
92 [Raspberry Pi] 라즈베리파이 : 10 Uses for a Raspberry Pi in Manufacturing : 제조 분야에서의 라즈베리파이의 10가지 용도 file 졸리운_곰 2024.12.28 215
91 [Embedded Platform] PLCS 대 PLDS : 응용 프로그램에 적합한 기술 선택 file 졸리운_곰 2024.12.28 147
90 [아두이노 arduino] Arduino – base64 encode and decode file 졸리운_곰 2024.03.11 207
» [아두이노 arduino] Simple encryption using XOR operator 졸리운_곰 2024.03.11 214
88 [아두이노 arduino] 아두이노 json 암호화: Crypt json content file 졸리운_곰 2024.03.11 218
87 IoT (임베디드 인터넷) RabbitMQ for IoT – Fun Tech Projects file 졸리운_곰 2024.03.09 285
86 C#으로 아두이노의 LED 제어하기 - C# 프로그래밍 file 졸리운_곰 2024.02.25 269
85 [Raspberry Pi] 라즈베리파이 GPIO 포트 ( LED, 버튼 ) 제어 file 졸리운_곰 2024.01.02 275
84 [Raspberry Pi] 라즈베리파이 GPIO file 졸리운_곰 2024.01.02 205
83 [Raspberry Pi] 2020년에 Raspberry Pi에서 실행할 수 있는 20가지 최고의 운영 체제 file 졸리운_곰 2024.01.02 191
82 [Raspberry Pi] 라즈베리파이 클러스터(병렬연결) file 졸리운_곰 2024.01.02 260
81 [Embedded Software] ARM Cortex-M : printf()를 만들어 보자 file 졸리운_곰 2023.04.02 197
80 [ 一日30分 인생승리의 학습법] 라즈베리파이 에뮬레이터 설치(QEMU) - raspbian jessie (4) - 한글 설정 file 졸리운_곰 2023.01.01 185
79 [ 一日30分 인생승리의 학습법] 라즈베리파이 에뮬레이터 설치(QEMU) - raspbian jessie (3) 최적화 하기(raspi-config) file 졸리운_곰 2023.01.01 158
78 [ 一日30分 인생승리의 학습법] 라즈베리파이 에뮬레이터 설치(QEMU) - raspbian jessie (2) - 이미지 size 늘리기 file 졸리운_곰 2023.01.01 184
77 [ 一日30分 인생승리의 학습법] 라즈베리파이 에뮬레이터 설치(QEMU) - raspbian jessie (1) 프로그램설치 file 졸리운_곰 2023.01.01 202
76 [Embedded Hardware] Atmega328 보드 만들기 - 보드 납땜 및 태스트.. file 졸리운_곰 2022.07.13 492
75 [Embedded Hardware] Atmega128 시작 - 키트 납땜 file 졸리운_곰 2022.07.13 326
74 SQLite를 사용해야 하는 이유 졸리운_곰 2021.10.17 237
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED