pike.git / lib / modules / SSL.pmod / Context.pike

version» Context lines:

pike.git/lib/modules/SSL.pmod/Context.pike:347:   // Generate a sort key for a cipher suite.   //   // The larger the value, the stronger the cipher suite.   protected int cipher_suite_sort_key(int suite)   {    array(int) info = [array(int)] (CIPHER_SUITES[suite] || ({ 0, 0, 0 }));       int keylength = CIPHER_effective_keylengths[info[1]];       // NB: Currently the hash algorithms are allocated in a suitable order. -  int hash = info[2]; +  // NB: The hash values are shifted 8 bits. +  int hash = info[2] >> 8;       // Adjust for the cipher mode.    if (sizeof(info) > 3) {    hash |= info[3]<<5;    if (info[3] == MODE_cbc) {    // CBC.    keylength >>= 1;    }    } else {    // Old suite; CBC or RC4.