Package org.mariadb.jdbc.plugin.authentication.standard

# Class ParsecPasswordPlugin

java.lang.Object
org.mariadb.jdbc.plugin.authentication.standard.ParsecPasswordPlugin

All Implemented Interfaces:
  `AuthenticationPlugin`

public class ParsecPasswordPlugin extends Object implements AuthenticationPlugin
Parsec password plugin

## Constructor Summary

Constructors
Constructor
Description
`ParsecPasswordPlugin(String authenticationData, byte[] seed)`
Initialization.

## Method Summary

Modifier and Type
Method
Description
`byte[]`
`hash(Credential credential)`
Return Hash
`boolean`
`isMitMProof()`
Can plugins is MitM-proof, permitting returning HASH
`org.mariadb.jdbc.client.ReadableByteBuf`
`process(Writer out, Reader in, org.mariadb.jdbc.client.Context context)`
Process parsec password plugin authentication.

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

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

## Constructor Details

### ParsecPasswordPlugin

public ParsecPasswordPlugin(String authenticationData, byte[] seed)
Initialization.

Parameters:
  `authenticationData` - authentication data (password/token)
  `seed` - server provided seed

## Method Details

### process

public org.mariadb.jdbc.client.ReadableByteBuf process(Writer out, Reader in, org.mariadb.jdbc.client.Context context) throws SQLException, IOException
Process parsec password plugin authentication. see https://mariadb.com/kb/en/connection/#parsec-plugin

Specified by:
  `process` in interface `AuthenticationPlugin`
Parameters:
  `out` - out stream
  `in` - in stream
  `context` - connection context
Returns:
  response packet
Throws:
  `IOException` - if socket error
  `SQLException` - if plugin exception

### isMitMProof

public boolean isMitMProof()
Description copied from interface: `AuthenticationPlugin`
Can plugins is MitM-proof, permitting returning HASH

Specified by:
  `isMitMProof` in interface `AuthenticationPlugin`
Returns:
  true if permitted

### hash

public byte[] hash(Credential credential)
Return Hash

Specified by:
  `hash` in interface `AuthenticationPlugin`
Parameters:
  `credential` - Credential
Returns:
  hash