Rename PSA_ALG_STREAM_CIPHER -> PSA_ALG_STREAM_CIPHER_BASE

Follow the usual naming convention: PSA_ALG_xxx_BASE for a constant
that isn't an algorithm, just used to build one.
This commit is contained in:
Gilles Peskine 2018-07-12 00:32:42 +02:00 committed by itayzafrir
parent 2853849498
commit 5d1888ebc5
2 changed files with 4 additions and 3 deletions

View File

@ -610,13 +610,14 @@ typedef uint32_t psa_algorithm_t;
#define PSA_ALG_CFB_BASE ((psa_algorithm_t)0x04000002)
#define PSA_ALG_OFB_BASE ((psa_algorithm_t)0x04000003)
#define PSA_ALG_XTS_BASE ((psa_algorithm_t)0x04000004)
#define PSA_ALG_STREAM_CIPHER ((psa_algorithm_t)0x04800000)
#define PSA_ALG_STREAM_CIPHER_BASE ((psa_algorithm_t)0x04800000)
#define PSA_ALG_CTR ((psa_algorithm_t)0x04800001)
#define PSA_ALG_ARC4 ((psa_algorithm_t)0x04800002)
#define PSA_ALG_IS_STREAM_CIPHER(alg) \
(((alg) & (PSA_ALG_CATEGORY_MASK | PSA_ALG_CIPHER_SUBCATEGORY_MASK)) == \
PSA_ALG_STREAM_CIPHER)
PSA_ALG_STREAM_CIPHER_BASE)
#define PSA_ALG_CCM ((psa_algorithm_t)0x06000001)
#define PSA_ALG_GCM ((psa_algorithm_t)0x06000002)

View File

@ -1191,7 +1191,7 @@ static const mbedtls_cipher_info_t *mbedtls_cipher_info_from_psa(
switch( alg )
{
case PSA_ALG_STREAM_CIPHER:
case PSA_ALG_STREAM_CIPHER_BASE:
mode = MBEDTLS_MODE_STREAM;
break;
case PSA_ALG_CBC_BASE: