protected function supportedInfo($name, $throw = false) {
        switch ($name) {
            case 'aes128':
            case 'aes256':
                $cipher = 'aes-'.substr($name, 3).'-cbc';
                return ['encrypt', 'decrypt', $cipher, false];
            case 'hsha1':
            case 'hsha256':
                $hash = substr($name, 1);
                return ['hmac', 'verifyHmac', $hash, true];
        }
        return $this->exception($throw, "Spec $name not supported.", 400);
    }
protected function supportedInfo($name, $throw = false) {
        switch ($name) {
            case 'aes128':
            case 'aes256':
                $cipher = 'aes-'.substr($name, 3).'-cbc';
                return ['encrypt', 'decrypt', $cipher, false];
            case 'hsha1':
            case 'hsha256':
                $hash = substr($name, 1);
                return ['hmac', 'verifyHmac', $hash, true];
        }
        return $this->exception($throw, "Spec $name not supported.", 400);
    }
protected function supportedInfo ( $ name , $ throw = false ) { switch ( $ name ) { case 'aes128' : case 'aes256' : $ cipher = 'aes-' . substr ( $ name , 3 ) . '-cbc' ; return [ 'encrypt' , 'decrypt' , $ cipher , false ] ; case 'hsha1' : case 'hsha256' : $ hash = substr ( $ name , 1 ) ; return [ 'hmac' , 'verifyHmac' , $ hash , true ] ; } return $ this -> exception ( $ throw , "Spec $name not supported." , 400 ) ; }
Get information about a supported spec name.

@param string $name The name of the spec.
@param bool $throw Whether or not throw an exception on error.
@return array|null Returns an array in the form [encode, decode, method, encodeFirst].
Returns null on error.
Get information about a supported spec name .