Changeset 1069


Ignore:
Timestamp:
07/06/11 16:37:33 (11 months ago)
Author:
paul
Message:
  • Made des_key_check_weak() conform to other functions in return values.
  • Added documentation for des_key_check_weak() and des_key_check_key_parity()
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/polarssl/des.h

    r1027 r1069  
    7878 * 
    7979 * \param key      8-byte secret key 
     80 * 
     81 * \return         0 is parity was ok, 1 if parity was not correct. 
    8082 */ 
    8183int des_key_check_key_parity( const unsigned char key[DES_KEY_SIZE] ); 
    8284 
    83  
    8485/** 
    8586 * \brief          Check that key is not a weak or semi-weak DES key 
    8687 * 
    8788 * \param key      8-byte secret key 
     89 * 
     90 * \resurn         0 if no weak key was found, 1 if a weak key was identified. 
    8891 */ 
    8992int des_key_check_weak( const unsigned char key[DES_KEY_SIZE] ); 
  • trunk/library/des.c

    r1014 r1069  
    372372    for( i = 0; i < WEAK_KEY_COUNT; i++ ) 
    373373        if( memcmp( weak_key_table[i], key, DES_KEY_SIZE) == 0) 
    374             return( 0 ); 
    375  
    376     return( 1 ); 
     374            return( 1 ); 
     375 
     376    return( 0 ); 
    377377} 
    378378 
Note: See TracChangeset for help on using the changeset viewer.

What are you looking for?