Package org.mariadb.r2dbc.message.client
Class Sha256PasswordPacket
- java.lang.Object
-
- org.mariadb.r2dbc.message.client.Sha256PasswordPacket
-
- All Implemented Interfaces:
ClientMessage
public final class Sha256PasswordPacket extends Object implements ClientMessage
-
-
Constructor Summary
Constructors Constructor Description Sha256PasswordPacket(MessageSequence sequencer, CharSequence password, byte[] seed, PublicKey publicKey)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<io.netty.buffer.ByteBuf>encode(Context context, io.netty.buffer.ByteBufAllocator allocator)static byte[]encrypt(PublicKey publicKey, CharSequence password, byte[] seed)Encode password with seed and public key.MessageSequencegetSequencer()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.mariadb.r2dbc.message.ClientMessage
releaseSave, resetSequencer, save
-
-
-
-
Constructor Detail
-
Sha256PasswordPacket
public Sha256PasswordPacket(MessageSequence sequencer, CharSequence password, byte[] seed, PublicKey publicKey)
-
-
Method Detail
-
encrypt
public static byte[] encrypt(PublicKey publicKey, CharSequence password, byte[] seed) throws io.r2dbc.spi.R2dbcException
Encode password with seed and public key.- Parameters:
publicKey- public keypassword- passwordseed- seed- Returns:
- encoded password
- Throws:
io.r2dbc.spi.R2dbcException- if cannot encode password
-
encode
public reactor.core.publisher.Mono<io.netty.buffer.ByteBuf> encode(Context context, io.netty.buffer.ByteBufAllocator allocator)
- Specified by:
encodein interfaceClientMessage
-
getSequencer
public MessageSequence getSequencer()
- Specified by:
getSequencerin interfaceClientMessage
-
-