On Wed, Apr 13, 2016 at 7:33 AM, Balakrishna Garapati < balakrishna.garap...@linaro.org> wrote:
> This RFC provides the support for the applicationis to inquire the given > cipher, authentication algorithms > > Signed-off-by: Balakrishna Garapati <balakrishna.garap...@linaro.org> > --- > include/odp/api/spec/crypto.h | 30 ++++++++++++++++++++++++++++++ > 1 file changed, 30 insertions(+) > > diff --git a/include/odp/api/spec/crypto.h b/include/odp/api/spec/crypto.h > index 41beedb..0def211 100644 > --- a/include/odp/api/spec/crypto.h > +++ b/include/odp/api/spec/crypto.h > @@ -254,6 +254,18 @@ typedef struct odp_crypto_op_result { > } odp_crypto_op_result_t; > > /** > + * Crypto API capability result > + */ > +typedef enum odp_crypto_capability_t { > + /** crypto algorithm not supported */ > + ODP_CRYPTO_NO_SUPPORT = 0, > + /** crypto algorithm supported in hardware */ > + ODP_CRYPTO_HW_SUPPORT, > + /** crypto algortihm supported in software */ > + ODP_CRYPTO_SW_SUPPORT > +} odp_crypto_capability_t; > Since you're using this for both crypto and auth the comments should probably be more neutral. However given the simple nature of the return, would an int be better than an enum? E.g., -1 = no support, 0 = HW support, 1 = SW support? > + > +/** > * Crypto session creation (synchronous) > * > * @param params Session parameters > @@ -368,6 +380,24 @@ uint64_t > odp_crypto_session_to_u64(odp_crypto_session_t hdl); > uint64_t odp_crypto_compl_to_u64(odp_crypto_compl_t hdl); > > /** > + * Verify the given crypto cipher algorithm support > + * > + * @param alg odp_cipher_alg_t to be verified > + * @return odp_crypto_capability_t > + * > + */ > +odp_crypto_capability_t odp_crypto_cipher_inquiry(odp_cipher_alg_t alg); > + > +/** > + * Verify the given crypto authentication algorithm support > + * > + * @param alg odp_auth_alg_t to be verified > + * @return odp_crypto_capability_t > + * > + */ > +odp_crypto_capability_t odp_crypto_auth_inquiry(odp_auth_alg_t alg); > + > +/** > * @} > */ > > -- > 1.9.1 > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp >
_______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp