# InitiateCryptoAlgorithm Method

## Overloads

| [InitiateCryptoAlgorithm(QTServiceType)](https://help.qlik.com/en-US/qlikview-developer/September2025/Subsystems/QMSAPIref/Content/PIX.Services.Certificate.CryptoInitiator.InitiateCryptoAlgorithm.htm#PIX_Services_Certificate_CryptoInitiator_InitiateCryptoAlgorithm_PIX_Services_ServiceSupport_QTServiceType_) |  | To be called in the startup phase of the services.<br>Tries to load the existing crypto key from the service certificate.<br>If it is called by the QMS (serviceType = QMS), it creates crypto keys if they are missing.<br>It returns true if keys are in place.<br>It throws an exception if it cannot continue.<br>NOTE: It loads the SecretsKeys from the certificates even though UseWinAuthorization is true; -- that's<br>this way the user can "downgrade" from "use cert auth" to "use win auth" and still be able to decrypt the secrets. |
| --- | --- | --- |

[](https://help.qlik.com/en-US/qlikview-developer/Subsystems/QMSAPIref/Content/PIX.Services.Certificate.CryptoInitiator.InitiateCryptoAlgorithm.htm) [](https://help.qlik.com/en-US/qlikview-developer/Subsystems/QMSAPIref/Content/PIX.Services.Certificate.CryptoInitiator.InitiateCryptoAlgorithm.htm)

## InitiateCryptoAlgorithm(QTServiceType)

To be called in the startup phase of the services. Tries to load the existing crypto key from the service certificate. If it is called by the QMS (serviceType = QMS), it creates crypto keys if they are missing. It returns true if keys are in place. It throws an exception if it cannot continue. NOTE: It loads the SecretsKeys from the certificates even though UseWinAuthorization is true; -- that's this way the user can "downgrade" from "use cert auth" to "use win auth" and still be able to decrypt the secrets.

### Declaration

```

          public static bool InitiateCryptoAlgorithm(QTServiceType serviceType)
    
  
```

### Parameters

| Type | Name | Description |
| --- | --- | --- |
| [QTServiceType](https://help.qlik.com/en-US/qlikview-developer/September2025/Subsystems/QMSAPIref/Content/PIX.Services.ServiceSupport.QTServiceType.htm) | serviceType |  |

### Returns

| Type | Description |
| --- | --- |
| System.Boolean |  |