function setKeyLength($length)
    {
        $length >>= 5;
        if ($length > 8) {
            $length = 8;
        } else if ($length < 4) {
            $length = 4;
        }
        $this->Nk = $length;
        $this->key_size = $length << 2;

        $this->explicit_key_length = true;
        $this->changed = true;
    }
function setKeyLength($length)
    {
        $length >>= 5;
        if ($length > 8) {
            $length = 8;
        } else if ($length < 4) {
            $length = 4;
        }
        $this->Nk = $length;
        $this->key_size = $length << 2;

        $this->explicit_key_length = true;
        $this->changed = true;
    }
function setKeyLength ( $ length ) { $ length >>= 5 ; if ( $ length > 8 ) { $ length = 8 ; } else if ( $ length < 4 ) { $ length = 4 ; } $ this -> Nk = $ length ; $ this -> key_size = $ length << 2 ; $ this -> explicit_key_length = true ; $ this -> changed = true ; }
Sets the key length

Valid key lengths are 128, 160, 192, 224, and 256.  If the length is less than 128, it will be rounded up to
128.  If the length is greater then 128 and invalid, it will be rounded down to the closest valid amount.

@access public
@param Integer $length
Sets the key length