From 556221a8e71a63ec9df60c08064e658be7636f4c Mon Sep 17 00:00:00 2001 From: vxunderground <57078196+vxunderground@users.noreply.github.com> Date: Thu, 14 Jul 2022 22:22:29 -0500 Subject: [PATCH] Create RfSecureStringCopy.cpp --- String Manipulation/RfSecureStringCopy.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 String Manipulation/RfSecureStringCopy.cpp diff --git a/String Manipulation/RfSecureStringCopy.cpp b/String Manipulation/RfSecureStringCopy.cpp new file mode 100644 index 0000000..dc1c853 --- /dev/null +++ b/String Manipulation/RfSecureStringCopy.cpp @@ -0,0 +1,17 @@ +PCHAR RfSecureStringCopyA(PCHAR String1, LPCSTR String2, SIZE_T Size) +{ + PCHAR pChar = String1; + + while (Size-- && (*String1++ = *String2++) != '\0'); + + return pChar; +} + +PWCHAR RfSecureStringCopyW(PWCHAR String1, LPCWSTR String2, SIZE_T Size) +{ + PWCHAR pChar = String1; + + while (Size-- && (*String1++ = *String2++) != '\0'); + + return pChar; +}