18 #if defined( USE_PGP ) || defined( USE_PGPKEYS )
33 static const PGP_ALGOMAP_INFO
FAR_BSS pgpAlgoMap[] = {
96 REQUIRES( pgpAlgo >= 0 && pgpAlgo <= 0xFF );
104 ( pgpAlgoMap[ i ].pgpAlgo != pgpAlgo || \
105 pgpAlgoMap[ i ].pgpAlgoClass != pgpAlgoClass ) && \
112 *cryptAlgo = pgpAlgoMap[ i ].cryptlibAlgo;
124 assert(
isWritePtr( pgpAlgo,
sizeof(
int ) ) );
133 pgpAlgoMap[ i ].cryptlibAlgo != cryptlibAlgo && \
140 *pgpAlgo = pgpAlgoMap[ i ].pgpAlgo;
163 value = sgetc( stream );
166 status = pgpToCryptlibAlgo( value, pgpAlgoClass, &algo );
196 assert(
isReadPtr( password, passwordLength ) );
197 assert( ( salt == NULL && saltSize == 0 ) || \
206 REQUIRES( ( salt == NULL && saltSize == 0 ) || \
240 password, passwordLength, hashAlgo,
241 salt, saltSize, iterations );
276 getHashAtomicParameters( hashAlgo, 0, &hashFunctionAtomic, NULL );
306 assert(
isReadPtr( ivInfo, ivInfoSize ) );
310 REQUIRES( ivInfoSize == ivDataSize + 2 );
340 &msgData, CRYPT_IATTRIBUTE_RANDOM_NONCE );
343 memcpy( ivInfo + ivDataSize, ivInfo + ivDataSize - 2, 2 );
345 ivInfo, ivInfoSize );
363 memcpy( ivInfoBuffer, ivInfo, ivInfoSize );
365 ivInfoBuffer, ivInfoSize );
367 ( ivInfoBuffer[ ivDataSize - 2 ] != ivInfoBuffer[ ivDataSize + 0 ] || \
368 ivInfoBuffer[ ivDataSize - 1 ] != ivInfoBuffer[ ivDataSize + 1 ] ) )