Skip to content

Commit d550808

Browse files
committed
Added xor as part of rsa encryption
Signed-off-by: S V <vats02581@gmail.com>
1 parent 06f7b3d commit d550808

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/MySqlConnectionFactoryProvider.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,9 @@ public final class MySqlConnectionFactoryProvider implements ConnectionFactoryPr
343343

344344
/**
345345
* Option to configure the database server's RSA Public Key file path on the local system if RSA encryption
346-
* is desired such as when using caching_sha2_password authentication type while {@link io.asyncer.r2dbc.mysql.constant.SslMode} is DISABLED. If
347-
* serverRSAPublicKeyFile not {@code null} and {@link io.asyncer.r2dbc.mysql.constant.SslMode} is not DISABLED, SSL encryption takes precedence.
346+
* is desired such as when using caching_sha2_password authentication type while
347+
* {@link io.asyncer.r2dbc.mysql.constant.SslMode} is DISABLED. If serverRSAPublicKeyFile not
348+
* {@code null} and {@link io.asyncer.r2dbc.mysql.constant.SslMode} is not DISABLED, SSL encryption takes precedence.
348349
*
349350
* @since 1.4.2
350351
*/

r2dbc-mysql/src/main/java/io/asyncer/r2dbc/mysql/authentication/MySqlAuthProvider.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ static MySqlAuthProvider build(String type) {
151151
* @param seed the seed bytes for rotating XOR obfuscation
152152
* @return the encrypted bytes
153153
*/
154-
static byte[] rsaEncryption(byte[] bytesToEncrypt, String serverRsaPublicKeyFile, ServerVersion serverVersion, byte[] seed) {
154+
static byte[] rsaEncryption(byte[] bytesToEncrypt, String serverRsaPublicKeyFile, ServerVersion serverVersion,
155+
byte[] seed) {
155156
try {
156157
bytesToEncrypt = AuthUtils.rotatingXor(bytesToEncrypt, seed);
157158

0 commit comments

Comments
 (0)