public final class com.mongodb.internal.authentication.NativeAuthenticationHelper
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: com.mongodb.internal.authentication.NativeAuthenticationHelper
super_class: java.lang.Object
{
private static final java.nio.charset.Charset UTF_8_CHARSET;
descriptor: Ljava/nio/charset/Charset;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: ldc "UTF-8"
invokestatic java.nio.charset.Charset.forName:(Ljava/lang/String;)Ljava/nio/charset/Charset;
putstatic com.mongodb.internal.authentication.NativeAuthenticationHelper.UTF_8_CHARSET:Ljava/nio/charset/Charset;
return
LocalVariableTable:
Start End Slot Name Signature
public static java.lang.String createAuthenticationHash(java.lang.String, char[]);
descriptor: (Ljava/lang/String;[C)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: new java.io.ByteArrayOutputStream
dup
aload 0
invokevirtual java.lang.String.length:()I
bipush 20
iadd
aload 1
arraylength
iadd
invokespecial java.io.ByteArrayOutputStream.<init>:(I)V
astore 2
start local 2 1: aload 2
aload 0
getstatic com.mongodb.internal.authentication.NativeAuthenticationHelper.UTF_8_CHARSET:Ljava/nio/charset/Charset;
invokevirtual java.lang.String.getBytes:(Ljava/nio/charset/Charset;)[B
invokevirtual java.io.ByteArrayOutputStream.write:([B)V
2: aload 2
ldc ":mongo:"
getstatic com.mongodb.internal.authentication.NativeAuthenticationHelper.UTF_8_CHARSET:Ljava/nio/charset/Charset;
invokevirtual java.lang.String.getBytes:(Ljava/nio/charset/Charset;)[B
invokevirtual java.io.ByteArrayOutputStream.write:([B)V
3: aload 2
new java.lang.String
dup
aload 1
invokespecial java.lang.String.<init>:([C)V
getstatic com.mongodb.internal.authentication.NativeAuthenticationHelper.UTF_8_CHARSET:Ljava/nio/charset/Charset;
invokevirtual java.lang.String.getBytes:(Ljava/nio/charset/Charset;)[B
invokevirtual java.io.ByteArrayOutputStream.write:([B)V
4: goto 7
StackMap locals: java.lang.String char[] java.io.ByteArrayOutputStream
StackMap stack: java.io.IOException
5: astore 3
start local 3 6: new java.lang.RuntimeException
dup
ldc "impossible"
aload 3
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 3 7: StackMap locals:
StackMap stack:
aload 2
invokevirtual java.io.ByteArrayOutputStream.toByteArray:()[B
invokestatic com.mongodb.internal.HexUtils.hexMD5:([B)Ljava/lang/String;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 userName Ljava/lang/String;
0 8 1 password [C
1 8 2 bout Ljava/io/ByteArrayOutputStream;
6 7 3 ioe Ljava/io/IOException;
Exception table:
from to target type
1 4 5 Class java.io.IOException
MethodParameters:
Name Flags
userName final
password final
public static org.bson.BsonDocument getAuthCommand(java.lang.String, char[], java.lang.String);
descriptor: (Ljava/lang/String;[CLjava/lang/String;)Lorg/bson/BsonDocument;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 0
aload 1
invokestatic com.mongodb.internal.authentication.NativeAuthenticationHelper.createAuthenticationHash:(Ljava/lang/String;[C)Ljava/lang/String;
aload 2
invokestatic com.mongodb.internal.authentication.NativeAuthenticationHelper.getAuthCommand:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/bson/BsonDocument;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 userName Ljava/lang/String;
0 1 1 password [C
0 1 2 nonce Ljava/lang/String;
MethodParameters:
Name Flags
userName final
password final
nonce final
public static org.bson.BsonDocument getAuthCommand(java.lang.String, java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lorg/bson/BsonDocument;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=5, args_size=3
start local 0 start local 1 start local 2 0: new java.lang.StringBuilder
dup
aload 2
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 3
start local 3 1: new org.bson.BsonDocument
dup
invokespecial org.bson.BsonDocument.<init>:()V
astore 4
start local 4 2: aload 4
ldc "authenticate"
new org.bson.BsonInt32
dup
iconst_1
invokespecial org.bson.BsonInt32.<init>:(I)V
invokevirtual org.bson.BsonDocument.put:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonValue;
pop
3: aload 4
ldc "user"
new org.bson.BsonString
dup
aload 0
invokespecial org.bson.BsonString.<init>:(Ljava/lang/String;)V
invokevirtual org.bson.BsonDocument.put:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonValue;
pop
4: aload 4
ldc "nonce"
new org.bson.BsonString
dup
aload 2
invokespecial org.bson.BsonString.<init>:(Ljava/lang/String;)V
invokevirtual org.bson.BsonDocument.put:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonValue;
pop
5: aload 4
ldc "key"
new org.bson.BsonString
dup
aload 3
getstatic com.mongodb.internal.authentication.NativeAuthenticationHelper.UTF_8_CHARSET:Ljava/nio/charset/Charset;
invokevirtual java.lang.String.getBytes:(Ljava/nio/charset/Charset;)[B
invokestatic com.mongodb.internal.HexUtils.hexMD5:([B)Ljava/lang/String;
invokespecial org.bson.BsonString.<init>:(Ljava/lang/String;)V
invokevirtual org.bson.BsonDocument.put:(Ljava/lang/String;Lorg/bson/BsonValue;)Lorg/bson/BsonValue;
pop
6: aload 4
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 userName Ljava/lang/String;
0 7 1 authHash Ljava/lang/String;
0 7 2 nonce Ljava/lang/String;
1 7 3 key Ljava/lang/String;
2 7 4 cmd Lorg/bson/BsonDocument;
MethodParameters:
Name Flags
userName final
authHash final
nonce final
public static org.bson.BsonDocument getNonceCommand();
descriptor: ()Lorg/bson/BsonDocument;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=0, args_size=0
0: new org.bson.BsonDocument
dup
ldc "getnonce"
new org.bson.BsonInt32
dup
iconst_1
invokespecial org.bson.BsonInt32.<init>:(I)V
invokespecial org.bson.BsonDocument.<init>:(Ljava/lang/String;Lorg/bson/BsonValue;)V
areturn
LocalVariableTable:
Start End Slot Name Signature
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lcom/mongodb/internal/authentication/NativeAuthenticationHelper;
}
SourceFile: "NativeAuthenticationHelper.java"