[CRYPTO] api: Sanitise mask when allocating ablkcipher/hash

When allocating ablkcipher/hash objects, we use a mask that's wider than
the usual type mask.  This patch sanitises the mask supplied by the user
so we don't end up using a narrower mask which may lead to unintended
results.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 file changed