Module org.firebirdsql.jaybird
Package org.firebirdsql.gds.ng.wire.crypt.arc4

# Class Arc4EncryptionPluginSpi

java.lang.Object
org.firebirdsql.gds.ng.wire.crypt.arc4.Arc4EncryptionPluginSpi

All Implemented Interfaces:
  `EncryptionPluginSpi`

public final class Arc4EncryptionPluginSpi extends Object implements EncryptionPluginSpi
ARC4 encryption plugin provider.

Since:
  4.0
Author:
  Mark Rotteveel

## Constructor Summary

Constructors
Constructor
Description
`Arc4EncryptionPluginSpi()`

## Method Summary

Modifier and Type
Method
Description
`EncryptionPlugin`
`createEncryptionPlugin(CryptSessionConfig cryptSessionConfig)`
Creates the encryption plugin for the provided crypt session config.
`EncryptionIdentifier`
`encryptionIdentifier()`
`boolean`
`isSupported(CryptConnectionInfo cryptConnectionInfo)`
Reports if the encryption plugin can work.

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

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

## Constructor Details

### Arc4EncryptionPluginSpi

public Arc4EncryptionPluginSpi()

## Method Details

### encryptionIdentifier

public EncryptionIdentifier encryptionIdentifier()

Specified by:
  `encryptionIdentifier` in interface `EncryptionPluginSpi`
Returns:
  Encryption identifier

### createEncryptionPlugin

public EncryptionPlugin createEncryptionPlugin(CryptSessionConfig cryptSessionConfig)
Description copied from interface: `EncryptionPluginSpi`
Creates the encryption plugin for the provided crypt session config.

Specified by:
  `createEncryptionPlugin` in interface `EncryptionPluginSpi`
Parameters:
  `cryptSessionConfig` - Crypt session config
Returns:
  Encryption plugin

### isSupported

public boolean isSupported(CryptConnectionInfo cryptConnectionInfo)
Description copied from interface: `EncryptionPluginSpi`
Reports if the encryption plugin can work.

The `connectionInfo` can be used to check compatibility with the connection, but other checks may be done as well. If the plugin expects to always work, it can simply return `true`.

NOTE: Returning `true` does not express a guarantee the plugin will work, instead `false` expresses that the plugin cannot (or should not) be tried to use, because it will fail anyway.

Specified by:
  `isSupported` in interface `EncryptionPluginSpi`
Parameters:
  `cryptConnectionInfo` - information on the connection
Returns:
  `true` if the SPI expects the plugin to work, `false` if the plugin will not work