How to call RtlSecureZeroMemory when you dont know the variable size?

Viewed 62

I'm using the lib xorstr to 'encrypt' strings containing sensitive data.

When I pass it to a function how I could 'quickly' clear it using RtlSecureZeroMemory when i don't know the string size?

#include "xorstr.h"

Foo(char* data) {
   // ...
   RtlSecureZeroMemory(data, <size???>);
   // ...
}  
    
int _tmain(int argc, _TCHAR* argv[]) {
    Foo(xorstr_("abc"));
}
0 Answers
Related