WebCryptoHmacKeyAlgorithmParams* WebCryptoKeyAlgorithm::hmacParams() const { ASSERT(!isNull()); if (paramsType() == WebCryptoKeyAlgorithmParamsTypeHmac) return static_cast<WebCryptoHmacKeyAlgorithmParams*>(m_private->params.get()); return 0; }
WebCryptoRsaHashedKeyAlgorithmParams* WebCryptoKeyAlgorithm::rsaHashedParams() const { ASSERT(!isNull()); if (paramsType() == WebCryptoKeyAlgorithmParamsTypeRsaHashed) return static_cast<WebCryptoRsaHashedKeyAlgorithmParams*>(m_private->params.get()); return 0; }
const WebCryptoAesCtrParams* WebCryptoAlgorithm::aesCtrParams() const { ASSERT(!isNull()); if (paramsType() == WebCryptoAlgorithmParamsTypeAesCtrParams) return static_cast<WebCryptoAesCtrParams*>(m_private->params.get()); return 0; }
WebCryptoHmacParams* WebCryptoAlgorithm::hmacParams() const { if (paramsType() == WebCryptoAlgorithmParamsTypeHmacParams) return static_cast<WebCryptoHmacParams*>(m_private->params.get()); return 0; }
WebCryptoAesKeyGenParams* WebCryptoAlgorithm::aesKeyGenParams() const { if (paramsType() == WebCryptoAlgorithmParamsTypeAesKeyGenParams) return static_cast<WebCryptoAesKeyGenParams*>(m_private->params.get()); return 0; }