Re: Securing a C++ class



On Jul 24, 11:59 am, Jonathan Lee <cho...@xxxxxxx> wrote:
Tom St Denis <t...@xxxxxxx> writes:

In LibTomCrypt [C not C++ but same thought process works here] I used
macros for all calloc/malloc/free/realloc and the developer could map
them to anything they wanted at build time.

Thanks for the input, Tom. That's exactly why I asked in this group --
to know what implementers and users are accustomed to.

Bruce Stephens <bruce+use...@xxxxxxxxxxxxxxxxxxxx> wrote:
An alternative would be to template the classes with an Allocator
template parameter and give a default value for that parameter (so users
who don't care don't need to provide it), much as is done with the
containers in the Standard library.  (I guess that's more what a C++ user
might expect, though for this purpose personally I wouldn't mind the
macro solution either.)

I overlooked the Allocator class.. silly me. As you say, that would
probably fit in nicely with the C++ design paradigm. Thanks!

Have you considered any other ways that you might do this in C++? ;)

-Le Chaud Lapin-
.



Relevant Pages

  • Re: Securing a C++ class
    ... macros for all calloc/malloc/free/realloc and the developer could map ... Thanks for the input, Tom. ... template parameter and give a default value for that parameter (so users ...
    (sci.crypt)
  • Re: Securing a C++ class
    ... macros for all calloc/malloc/free/realloc and the developer could map ... In more recent work I use the same idea to map them to debug versions ... macros would also work in C++. ... template parameter and give a default value for that parameter (so users ...
    (sci.crypt)
  • Re: Fate of lambda, Functional Programming in Python...
    ... Simple map and filter implementations ... if init is None: ... Macros for an infix language are not impossible, ...
    (comp.lang.python)
  • Re: Private Sub
    ... > Tom Ogilvy ... I believe that I have created a workbook that would be very difficult to ... someone open it without macros running - by "Disable Macros" upon opening. ... I believe that If someone wants to bypass protection, ...
    (microsoft.public.excel.programming)
  • Re: Close a workbook without saving macros
    ... I'm not Tom, but that code only removes the macros. ... It'll be up to you to save the resulting workbook as a new name -- so the ... >> Dim ThisRef As Reference, WS As Worksheet, DLG As DialogSheet ...
    (microsoft.public.excel)