Mir

Code review comment for lp:~mir-team/mir/attestable-timestamps-server

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> > +std::vector<uint8_t> get_random_data(unsigned size);
> >
> > Could be:
> >
> > CookieFactory::CookieFactory(unsigned size);
> >
>
> I had this at first, but switched up because one of the primary use-cases for
> CookieFactory is when you've shared the secret with another process, which you
> can't do if you've called CookieFactory(unsigned size)

I was thinking two constructors would be:

   explicit CookieFactory(std::vector<uint8_t> const& secret);
   explicit CookieFactory(unsigned size);

But I take your point - you need access to the "random data" to share the secret.

« Back to merge proposal