X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/9455b51c2a0554ea2bd55a28dee5a5c2a6707fc6..be67483e63430608982f1c92e02b59d7b4dc65b3:/armsrc/string.c diff --git a/armsrc/string.c b/armsrc/string.c index cc71276c..acb5a460 100644 --- a/armsrc/string.c +++ b/armsrc/string.c @@ -7,11 +7,9 @@ //----------------------------------------------------------------------------- // Common string.h functions //----------------------------------------------------------------------------- - #include "string.h" -#include -void *memcpy(void *dest, const void *src, int len) +RAMFUNC void *memcpy(void *dest, const void *src, int len) { uint8_t *d = dest; const uint8_t *s = src; @@ -33,7 +31,7 @@ void *memset(void *dest, int c, int len) return dest; } -int memcmp(const void *av, const void *bv, int len) +RAMFUNC int memcmp(const void *av, const void *bv, int len) { const uint8_t *a = av; const uint8_t *b = bv; @@ -48,6 +46,11 @@ int memcmp(const void *av, const void *bv, int len) return 0; } +void memxor(uint8_t * dest, uint8_t * src, size_t len) { + for( ; len > 0; len--,dest++,src++) + *dest ^= *src; +} + int strlen(const char *str) { int l = 0;