Xor Two Strings In C - Gists · GitHub

Skip to content Search Gists Search Gists All gists Back to GitHub Sign in Sign up Sign in Sign up Dismiss alert {{ message }}

Instantly share code, notes, and snippets.

@ioncodes ioncodes/xor.c Last active September 2, 2018 20:01 Show Gist options
  • Star (0) You must be signed in to star a gist
  • Fork (1) You must be signed in to fork a gist
  • Embed Select an option
    • Embed Embed this gist in your website.
    • Share Copy sharable link for this gist.
    • Clone via HTTPS Clone using the web URL.

    No results found

    Learn more about clone URLs Clone this repository at <script src="https://gist.github.com/ioncodes/ec791f37c41ca39ee46d053be3db8590.js"></script>
  • Save ioncodes/ec791f37c41ca39ee46d053be3db8590 to your computer and use it in GitHub Desktop.
Code Revisions 2 Forks 1 Embed Select an option
  • Embed Embed this gist in your website.
  • Share Copy sharable link for this gist.
  • Clone via HTTPS Clone using the web URL.

No results found

Learn more about clone URLs Clone this repository at <script src="https://gist.github.com/ioncodes/ec791f37c41ca39ee46d053be3db8590.js"></script> Save ioncodes/ec791f37c41ca39ee46d053be3db8590 to your computer and use it in GitHub Desktop. Download ZIP xor two strings in c Raw xor.c This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters
#include <stdio.h>
#include <memory.h>
#include <stdlib.h>
#define LENGTH 5
void xor(char const value1[LENGTH], char const value2[LENGTH], char *xored[LENGTH]) {
for(int i=0; i<LENGTH; ++i) {
xored[i] = (char)(value1[i] ^ value2[i]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment You can’t perform that action at this time.

Từ khóa » C Xor Char