Package com.microsoft.sqlserver.jdbc

## Interface ISQLServerEnclaveProvider

All Known Implementing Classes:
  `SQLServerAASEnclaveProvider`, `SQLServerVSMEnclaveProvider`

    public interface ISQLServerEnclaveProvider

Provides an interface to create an Enclave Session

### Field Summary

Fields
`static String` `SDPE1`
`static String` `SDPE2`

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`ArrayList<byte[]>` `createEnclaveSession​(SQLServerConnection connection, String userSql, String preparedTypeDefinitions, com.microsoft.sqlserver.jdbc.Parameter[] params, ArrayList<String> parameterNames)` Creates the enclave session
`default ResultSet` `executeSDPEv1​(PreparedStatement stmt, String userSql, String preparedTypeDefinitions)`
`default ResultSet` `executeSDPEv2​(PreparedStatement stmt, String userSql, String preparedTypeDefinitions, com.microsoft.sqlserver.jdbc.BaseAttestationRequest req)`
`void` `getAttestationParameters​(String url)` Returns the attestation parameters
`default byte[]` `getEnclavePackage​(String userSQL, ArrayList<byte[]> enclaveCEKs)`
`com.microsoft.sqlserver.jdbc.EnclaveSession` `getEnclaveSession()` Returns the enclave session
`void` `invalidateEnclaveSession()` Invalidates an enclave session
`default void` `processSDPEv1​(String userSql, String preparedTypeDefinitions, com.microsoft.sqlserver.jdbc.Parameter[] params, ArrayList<String> parameterNames, SQLServerConnection connection, PreparedStatement stmt, ResultSet rs, ArrayList<byte[]> enclaveRequestedCEKs)`

### Field Detail

#### SDPE1

    static final String SDPE1

See Also:
  Constant Field Values

#### SDPE2

    static final String SDPE2

See Also:
  Constant Field Values

### Method Detail

#### getEnclavePackage

    default byte[] getEnclavePackage​(String userSQL,
                                     ArrayList<byte[]> enclaveCEKs)
                              throws SQLServerException

Throws:
  `SQLServerException`

#### executeSDPEv2

    default ResultSet executeSDPEv2​(PreparedStatement stmt,
                                    String userSql,
                                    String preparedTypeDefinitions,
                                    com.microsoft.sqlserver.jdbc.BaseAttestationRequest req)
                             throws SQLException,
                                    IOException

Throws:
  `SQLException`
  `IOException`

#### executeSDPEv1

    default ResultSet executeSDPEv1​(PreparedStatement stmt,
                                    String userSql,
                                    String preparedTypeDefinitions)
                             throws SQLException

Throws:
  `SQLException`

#### processSDPEv1

    default void processSDPEv1​(String userSql,
                               String preparedTypeDefinitions,
                               com.microsoft.sqlserver.jdbc.Parameter[] params,
                               ArrayList<String> parameterNames,
                               SQLServerConnection connection,
                               PreparedStatement stmt,
                               ResultSet rs,
                               ArrayList<byte[]> enclaveRequestedCEKs)
                        throws SQLException

Throws:
  `SQLException`

#### getAttestationParameters

    void getAttestationParameters​(String url)
                           throws SQLServerException

Returns the attestation parameters

Parameters:
  `url` - attestation url
Throws:
  `SQLServerException` - when an error occurs.

#### createEnclaveSession

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

Creates the enclave session

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

    void invalidateEnclaveSession()

Invalidates an enclave session

#### getEnclaveSession

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

Returns the enclave session

Returns:
  the enclave session