Search
 
SCRIPT & CODE EXAMPLE
 

CPP

arduino xor checksum

String xorChecksum(String s) {
  byte b = s.charAt(0);
  for (int i=1; i<s.length(); i++) {
    b = b ^ s.charAt(i);
  }
  String checksum = String(b, HEX);
  if (checksum.length() ==1) checksum = "0" + checksum; 
  return checksum;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: What is the "--" operator in C/C++? 
Cpp :: last character of std::string 
Cpp :: how to play sounds in c++ 
Cpp :: ++i and i++ 
Cpp :: C++ fill string with random uppercase letters 
Cpp :: c++ map insert 
Cpp :: setw c++ 
Cpp :: c include 
Cpp :: classes constructor in c++ 
Cpp :: copying a set to vector in c++ 
Cpp :: sort vector c++ 
Cpp :: How to get cursor position c++ 
Cpp :: print counting in c++ 
Cpp :: constructor in cpp 
Cpp :: c++ find object in vector by attribute 
Cpp :: how to make window resizable in sdl 
Cpp :: array of Methods c++ 
Cpp :: string format decimal places c++ 
Cpp :: how to replace part of string with new string c++ 
Cpp :: prime or not in cpp 
Cpp :: do while c++ 
Cpp :: install qpid broker in ubuntu/linux 
Cpp :: fill vector with zeros c++ 
Cpp :: c++ remove all elements equal to 
Cpp :: max c++ 
Cpp :: linear search 
Cpp :: how to increase array memory in c++ 
Cpp :: count number of char in a string c++ 
Cpp :: how to find factorial of number in c++ 
Cpp :: c++ check if number is even or odd 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =