The problem is that if the Bouncy Castle registrar is present and enabled, we'll end up using the Bouncy Castle implementations for just about anything. But not all Bouncy Castle versions have native implementations of the algorithms. If BC AES is used and is implemented in Java, performance will be very poor. SunJCE's AES uses native code and is much faster.
If no Bouncy Castle is registered, this extra registrar will not have an effect. Like all registrars, this one can be
disabled via a system property org.apache.sshd.security.provider.SunJCEWrapper.enabled=false. Note that this
does not disable the fallback to the platform provider; it only disables this wrapper which can be used to
force the use of the "SunJCE" standard Java provider even if some other registrar also supports an algorithm (and
would thus normally be preferred).
The registrar can be configured as usual. By default it has only the AES cipher and the SHA macs enabled, everything else is disabled.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | getDefaultSecurityEntitySupportValue(Class<?>
The requested entity type - its simple name serves to build the configuration property name. entityType)Overrides default org.
|
| public String | getProviderName()
Overrides default org. Retrieves the underlying |
| public Provider | |
| public String | |
| public boolean | isEnabled()
Overrides default org.
|
| public boolean | |
| public boolean |
| defaultProperties | back to summary |
|---|---|
| private final Map<String, String> defaultProperties | |
| SunJCESecurityProviderRegistrar | back to summary |
|---|---|
| public SunJCESecurityProviderRegistrar() | |
| getDefaultSecurityEntitySupportValue | back to summary |
|---|---|
| public String getDefaultSecurityEntitySupportValue(Class<?> entityType) Overrides default org.
| |
| getProviderName | back to summary |
|---|---|
| public String getProviderName() Overrides default org. Doc from org. Retrieves the underlying | |
| getSecurityProvider | back to summary |
|---|---|
| public Provider getSecurityProvider() Implements org.
| |
| getString | back to summary |
|---|---|
| public String getString(String name) Overrides default org.
| |
| isEnabled | back to summary |
|---|---|
| public boolean isEnabled() Overrides default org.
| |
| isNamedProviderUsed | back to summary |
|---|---|
| public boolean isNamedProviderUsed() Overrides default org.
| |
| isSupported | back to summary |
|---|---|
| public boolean isSupported() Implements org.
| |