Navigation:  thinBasic Modules > Crypto >

Crypto_EnumProviders

Previous pageReturn to chapter overviewNext page

 

Description

 

Retrieves the first or next available cryptographic service providers (CSPs).

Used in a loop, this function can retrieve in sequence all of the CSPs available on a computer.

 

Syntax

 

s = Crypto_EnumProviders(nIndex) 

 

Returns

 

String

The name of selected cryptographic service providers (CSPs).

 

Parameters

 

Name

Type

Optional

Meaning

nIndex

Numeric

No

A zero based index of the CSPs list

 

Remarks

 

This functions is based on Microsoft's PROV_RSA_FULL Cryptographic Service Provider Type.

 

Restrictions

 

See also

 

Crypto_EnumProviderTypes, Crypto_GetDefaultProvider, Crypto_GetProvidersCount

 

Examples

 

USES "Console"

 

Dim nCount As Long

Dim i      As Long

 

nCount = Crypto_GetProvidersCount() - 1    ' zero based index

 

For i = 0 To nCount

  PrintL format$(i + 1, "00") + ") " + Crypto_EnumProviders(i)

Next

 

 

© 2004-2008 thinBasic. All rights reserved. Version 1.7.0.0 Web Site: http://www.thinbasic.com