Message ID | 1480900520-21989-3-git-send-email-bill.fischofer@linaro.org |
---|---|
State | New |
Headers | show |
> diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h > index 0cb8814..10373a3 100644 > --- a/include/odp/api/spec/crypto.h > +++ b/include/odp/api/spec/crypto.h > @@ -19,6 +19,8 @@ > extern "C" { > #endif > > +#include <odp/api/random.h> > + > /** @defgroup odp_crypto ODP CRYPTO > * Macros, enums, types and operations to utilise crypto. > * @{ > @@ -332,6 +334,8 @@ typedef struct odp_crypto_capability_t { > /** Authentication algorithms implemented with HW offload */ > odp_crypto_auth_algos_t hw_auths; > > + /** Highest kind of random data available */ > + odp_random_kind_t max_random_kind; > } odp_crypto_capability_t; > This should be in random.h. Maybe simple ... odp_random_kind_t odp_random_max_kind(void); ... would do it. -Petri
On Mon, Dec 5, 2016 at 9:04 AM, Savolainen, Petri (Nokia - FI/Espoo) <petri.savolainen@nokia-bell-labs.com> wrote: >> diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h >> index 0cb8814..10373a3 100644 >> --- a/include/odp/api/spec/crypto.h >> +++ b/include/odp/api/spec/crypto.h >> @@ -19,6 +19,8 @@ >> extern "C" { >> #endif >> >> +#include <odp/api/random.h> >> + >> /** @defgroup odp_crypto ODP CRYPTO >> * Macros, enums, types and operations to utilise crypto. >> * @{ >> @@ -332,6 +334,8 @@ typedef struct odp_crypto_capability_t { >> /** Authentication algorithms implemented with HW offload */ >> odp_crypto_auth_algos_t hw_auths; >> >> + /** Highest kind of random data available */ >> + odp_random_kind_t max_random_kind; >> } odp_crypto_capability_t; >> > > This should be in random.h. Maybe simple ... > > odp_random_kind_t odp_random_max_kind(void); > > ... would do it. We've consolidated this sort of information under the general odp_xxx_capability() framework so it would be consistent to stick with this. While today kind is the only capability we're exposing that doesn't mean we wouldn't want to expose additional capabilities in the future. But I agree this would be a reasonable exception if you'd prefer that. > > > -Petri
diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h index 0cb8814..10373a3 100644 --- a/include/odp/api/spec/crypto.h +++ b/include/odp/api/spec/crypto.h @@ -19,6 +19,8 @@ extern "C" { #endif +#include <odp/api/random.h> + /** @defgroup odp_crypto ODP CRYPTO * Macros, enums, types and operations to utilise crypto. * @{ @@ -332,6 +334,8 @@ typedef struct odp_crypto_capability_t { /** Authentication algorithms implemented with HW offload */ odp_crypto_auth_algos_t hw_auths; + /** Highest kind of random data available */ + odp_random_kind_t max_random_kind; } odp_crypto_capability_t; /**
Add the field max_random_kind to the odp_crypto_capability_t struct Signed-off-by: Bill Fischofer <bill.fischofer@linaro.org> --- include/odp/api/spec/crypto.h | 4 ++++ 1 file changed, 4 insertions(+) -- 2.7.4