Package com.microsoft.sqlserver.jdbc

## Class SQLServerVSMEnclaveProvider

- java.lang.Object
- - com.microsoft.sqlserver.jdbc.SQLServerVSMEnclaveProvider

All Implemented Interfaces:
  `ISQLServerEnclaveProvider`

    public class SQLServerVSMEnclaveProvider
    extends java.lang.Object
    implements ISQLServerEnclaveProvider

Provides the implementation of the VSM Enclave Provider. The enclave provider encapsulates the client-side implementation details of the enclave attestation protocol.

### Constructor Summary

Constructors
`SQLServerVSMEnclaveProvider()`

### Method Summary

All Methods Instance Methods Concrete Methods
`java.util.ArrayList<byte[]>` `createEnclaveSession​(SQLServerConnection connection, java.lang.String userSql, java.lang.String preparedTypeDefinitions, com.microsoft.sqlserver.jdbc.Parameter[] params, java.util.ArrayList<java.lang.String> parameterNames)` Creates the enclave session
`void` `getAttestationParameters​(boolean createNewParameters, java.lang.String url)` Returns the attestation parameters
`byte[]` `getEnclavePackage​(java.lang.String userSQL, java.util.ArrayList<byte[]> enclaveCEKs)`
`com.microsoft.sqlserver.jdbc.EnclaveSession` `getEnclaveSession()` Returns the enclave session
`void` `invalidateEnclaveSession()` Invalidates an enclave session

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### SQLServerVSMEnclaveProvider

    public SQLServerVSMEnclaveProvider()

### Method Detail

#### getAttestationParameters

    public void getAttestationParameters​(boolean createNewParameters,
                                         java.lang.String url)
                                  throws SQLServerException

Description copied from interface: `ISQLServerEnclaveProvider`
Returns the attestation parameters

Specified by:
  `getAttestationParameters` in interface `ISQLServerEnclaveProvider`
Parameters:
  `createNewParameters` - indicates whether to create new parameters
  `url` - attestation url
Throws:
  `SQLServerException` - when an error occurs.

#### createEnclaveSession

    public java.util.ArrayList<byte[]> createEnclaveSession​(SQLServerConnection connection,
                                                            java.lang.String userSql,
                                                            java.lang.String preparedTypeDefinitions,
                                                            com.microsoft.sqlserver.jdbc.Parameter[] params,
                                                            java.util.ArrayList<java.lang.String> parameterNames)
                                                     throws SQLServerException

Description copied from interface: `ISQLServerEnclaveProvider`
Creates the enclave session

Specified by:
  `createEnclaveSession` in interface `ISQLServerEnclaveProvider`
Parameters:
  `connection` - connection
  `userSql` - user sql
  `preparedTypeDefinitions` - preparedTypeDefinitions
  `params` - params
  `parameterNames` - parameterNames
Returns:
  list of enclave requested CEKs
Throws:
  `SQLServerException` - when an error occurs.

#### invalidateEnclaveSession

    public void invalidateEnclaveSession()

Description copied from interface: `ISQLServerEnclaveProvider`
Invalidates an enclave session

Specified by:
  `invalidateEnclaveSession` in interface `ISQLServerEnclaveProvider`

#### getEnclaveSession

    public com.microsoft.sqlserver.jdbc.EnclaveSession getEnclaveSession()

Description copied from interface: `ISQLServerEnclaveProvider`
Returns the enclave session

Specified by:
  `getEnclaveSession` in interface `ISQLServerEnclaveProvider`
Returns:
  the enclave session

#### getEnclavePackage

    public byte[] getEnclavePackage​(java.lang.String userSQL,
                                    java.util.ArrayList<byte[]> enclaveCEKs)
                             throws SQLServerException

Specified by:
  `getEnclavePackage` in interface `ISQLServerEnclaveProvider`
Throws:
  `SQLServerException`