public class org.springframework.security.crypto.argon2.Argon2PasswordEncoder implements org.springframework.security.crypto.password.PasswordEncoder
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.springframework.security.crypto.argon2.Argon2PasswordEncoder
super_class: java.lang.Object
{
private static final int DEFAULT_SALT_LENGTH;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 16
private static final int DEFAULT_HASH_LENGTH;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 32
private static final int DEFAULT_PARALLELISM;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 1
private static final int DEFAULT_MEMORY;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 4096
private static final int DEFAULT_ITERATIONS;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 3
private final org.apache.commons.logging.Log logger;
descriptor: Lorg/apache/commons/logging/Log;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int hashLength;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int parallelism;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int memory;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int iterations;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.springframework.security.crypto.keygen.BytesKeyGenerator saltGenerator;
descriptor: Lorg/springframework/security/crypto/keygen/BytesKeyGenerator;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=1, args_size=1
start local 0 0: aload 0
bipush 16
bipush 32
iconst_1
sipush 4096
iconst_3
invokespecial org.springframework.security.crypto.argon2.Argon2PasswordEncoder.<init>:(IIIII)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/springframework/security/crypto/argon2/Argon2PasswordEncoder;
public void <init>(int, int, int, int, int);
descriptor: (IIIII)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=6, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
aload 0
invokevirtual java.lang.Object.getClass:()Ljava/lang/Class;
invokestatic org.apache.commons.logging.LogFactory.getLog:(Ljava/lang/Class;)Lorg/apache/commons/logging/Log;
putfield org.springframework.security.crypto.argon2.Argon2PasswordEncoder.logger:Lorg/apache/commons/logging/Log;
2: aload 0
iload 2
putfield org.springframework.security.crypto.argon2.Argon2PasswordEncoder.hashLength:I
3: aload 0
iload 3
putfield org.springframework.security.crypto.argon2.Argon2PasswordEncoder.parallelism:I
4: aload 0
iload 4
putfield org.springframework.security.crypto.argon2.Argon2PasswordEncoder.memory:I
5: aload 0
iload 5
putfield org.springframework.security.crypto.argon2.Argon2PasswordEncoder.iterations:I
6: aload 0
iload 1
invokestatic org.springframework.security.crypto.keygen.KeyGenerators.secureRandom:(I)Lorg/springframework/security/crypto/keygen/BytesKeyGenerator;
putfield org.springframework.security.crypto.argon2.Argon2PasswordEncoder.saltGenerator:Lorg/springframework/security/crypto/keygen/BytesKeyGenerator;
7: return
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/springframework/security/crypto/argon2/Argon2PasswordEncoder;
0 8 1 saltLength I
0 8 2 hashLength I
0 8 3 parallelism I
0 8 4 memory I
0 8 5 iterations I
MethodParameters:
Name Flags
saltLength
hashLength
parallelism
memory
iterations
public java.lang.String encode(java.lang.CharSequence);
descriptor: (Ljava/lang/CharSequence;)Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=6, args_size=2
start local 0 start local 1 0: aload 0
getfield org.springframework.security.crypto.argon2.Argon2PasswordEncoder.saltGenerator:Lorg/springframework/security/crypto/keygen/BytesKeyGenerator;
invokeinterface org.springframework.security.crypto.keygen.BytesKeyGenerator.generateKey:()[B
astore 2
start local 2 1: aload 0
getfield org.springframework.security.crypto.argon2.Argon2PasswordEncoder.hashLength:I
newarray 8
astore 3
start local 3 2: new org.bouncycastle.crypto.params.Argon2Parameters$Builder
dup
3: iconst_2
4: invokespecial org.bouncycastle.crypto.params.Argon2Parameters$Builder.<init>:(I)V
5: aload 2
invokevirtual org.bouncycastle.crypto.params.Argon2Parameters$Builder.withSalt:([B)Lorg/bouncycastle/crypto/params/Argon2Parameters$Builder;
6: aload 0
getfield org.springframework.security.crypto.argon2.Argon2PasswordEncoder.parallelism:I
invokevirtual org.bouncycastle.crypto.params.Argon2Parameters$Builder.withParallelism:(I)Lorg/bouncycastle/crypto/params/Argon2Parameters$Builder;
7: aload 0
getfield org.springframework.security.crypto.argon2.Argon2PasswordEncoder.memory:I
invokevirtual org.bouncycastle.crypto.params.Argon2Parameters$Builder.withMemoryAsKB:(I)Lorg/bouncycastle/crypto/params/Argon2Parameters$Builder;
8: aload 0
getfield org.springframework.security.crypto.argon2.Argon2PasswordEncoder.iterations:I
invokevirtual org.bouncycastle.crypto.params.Argon2Parameters$Builder.withIterations:(I)Lorg/bouncycastle/crypto/params/Argon2Parameters$Builder;
9: invokevirtual org.bouncycastle.crypto.params.Argon2Parameters$Builder.build:()Lorg/bouncycastle/crypto/params/Argon2Parameters;
10: astore 4
start local 4 11: new org.bouncycastle.crypto.generators.Argon2BytesGenerator
dup
invokespecial org.bouncycastle.crypto.generators.Argon2BytesGenerator.<init>:()V
astore 5
start local 5 12: aload 5
aload 4
invokevirtual org.bouncycastle.crypto.generators.Argon2BytesGenerator.init:(Lorg/bouncycastle/crypto/params/Argon2Parameters;)V
13: aload 5
aload 1
invokeinterface java.lang.CharSequence.toString:()Ljava/lang/String;
invokevirtual java.lang.String.toCharArray:()[C
aload 3
invokevirtual org.bouncycastle.crypto.generators.Argon2BytesGenerator.generateBytes:([C[B)I
pop
14: aload 3
aload 4
invokestatic org.springframework.security.crypto.argon2.Argon2EncodingUtils.encode:([BLorg/bouncycastle/crypto/params/Argon2Parameters;)Ljava/lang/String;
areturn
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lorg/springframework/security/crypto/argon2/Argon2PasswordEncoder;
0 15 1 rawPassword Ljava/lang/CharSequence;
1 15 2 salt [B
2 15 3 hash [B
11 15 4 params Lorg/bouncycastle/crypto/params/Argon2Parameters;
12 15 5 generator Lorg/bouncycastle/crypto/generators/Argon2BytesGenerator;
MethodParameters:
Name Flags
rawPassword
public boolean matches(java.lang.CharSequence, java.lang.String);
descriptor: (Ljava/lang/CharSequence;Ljava/lang/String;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 2
ifnonnull 3
1: aload 0
getfield org.springframework.security.crypto.argon2.Argon2PasswordEncoder.logger:Lorg/apache/commons/logging/Log;
ldc "password hash is null"
invokeinterface org.apache.commons.logging.Log.warn:(Ljava/lang/Object;)V
2: iconst_0
ireturn
3: StackMap locals:
StackMap stack:
aload 2
invokestatic org.springframework.security.crypto.argon2.Argon2EncodingUtils.decode:(Ljava/lang/String;)Lorg/springframework/security/crypto/argon2/Argon2EncodingUtils$Argon2Hash;
astore 3
start local 3 4: goto 8
end local 3 5: StackMap locals:
StackMap stack: java.lang.IllegalArgumentException
astore 4
start local 4 6: aload 0
getfield org.springframework.security.crypto.argon2.Argon2PasswordEncoder.logger:Lorg/apache/commons/logging/Log;
ldc "Malformed password hash"
aload 4
invokeinterface org.apache.commons.logging.Log.warn:(Ljava/lang/Object;Ljava/lang/Throwable;)V
7: iconst_0
ireturn
end local 4 start local 3 8: StackMap locals: org.springframework.security.crypto.argon2.Argon2EncodingUtils$Argon2Hash
StackMap stack:
aload 3
invokevirtual org.springframework.security.crypto.argon2.Argon2EncodingUtils$Argon2Hash.getHash:()[B
arraylength
newarray 8
astore 4
start local 4 9: new org.bouncycastle.crypto.generators.Argon2BytesGenerator
dup
invokespecial org.bouncycastle.crypto.generators.Argon2BytesGenerator.<init>:()V
astore 5
start local 5 10: aload 5
aload 3
invokevirtual org.springframework.security.crypto.argon2.Argon2EncodingUtils$Argon2Hash.getParameters:()Lorg/bouncycastle/crypto/params/Argon2Parameters;
invokevirtual org.bouncycastle.crypto.generators.Argon2BytesGenerator.init:(Lorg/bouncycastle/crypto/params/Argon2Parameters;)V
11: aload 5
aload 1
invokeinterface java.lang.CharSequence.toString:()Ljava/lang/String;
invokevirtual java.lang.String.toCharArray:()[C
aload 4
invokevirtual org.bouncycastle.crypto.generators.Argon2BytesGenerator.generateBytes:([C[B)I
pop
12: aload 3
invokevirtual org.springframework.security.crypto.argon2.Argon2EncodingUtils$Argon2Hash.getHash:()[B
aload 4
invokestatic org.springframework.security.crypto.argon2.Argon2PasswordEncoder.constantTimeArrayEquals:([B[B)Z
ireturn
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/springframework/security/crypto/argon2/Argon2PasswordEncoder;
0 13 1 rawPassword Ljava/lang/CharSequence;
0 13 2 encodedPassword Ljava/lang/String;
4 5 3 decoded Lorg/springframework/security/crypto/argon2/Argon2EncodingUtils$Argon2Hash;
8 13 3 decoded Lorg/springframework/security/crypto/argon2/Argon2EncodingUtils$Argon2Hash;
6 8 4 ex Ljava/lang/IllegalArgumentException;
9 13 4 hashBytes [B
10 13 5 generator Lorg/bouncycastle/crypto/generators/Argon2BytesGenerator;
Exception table:
from to target type
3 4 5 Class java.lang.IllegalArgumentException
MethodParameters:
Name Flags
rawPassword
encodedPassword
public boolean upgradeEncoding(java.lang.String);
descriptor: (Ljava/lang/String;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 1
ifnull 1
aload 1
invokevirtual java.lang.String.length:()I
ifne 3
1: StackMap locals:
StackMap stack:
aload 0
getfield org.springframework.security.crypto.argon2.Argon2PasswordEncoder.logger:Lorg/apache/commons/logging/Log;
ldc "password hash is null"
invokeinterface org.apache.commons.logging.Log.warn:(Ljava/lang/Object;)V
2: iconst_0
ireturn
3: StackMap locals:
StackMap stack:
aload 1
invokestatic org.springframework.security.crypto.argon2.Argon2EncodingUtils.decode:(Ljava/lang/String;)Lorg/springframework/security/crypto/argon2/Argon2EncodingUtils$Argon2Hash;
invokevirtual org.springframework.security.crypto.argon2.Argon2EncodingUtils$Argon2Hash.getParameters:()Lorg/bouncycastle/crypto/params/Argon2Parameters;
astore 2
start local 2 4: aload 2
invokevirtual org.bouncycastle.crypto.params.Argon2Parameters.getMemory:()I
aload 0
getfield org.springframework.security.crypto.argon2.Argon2PasswordEncoder.memory:I
if_icmplt 5
aload 2
invokevirtual org.bouncycastle.crypto.params.Argon2Parameters.getIterations:()I
aload 0
getfield org.springframework.security.crypto.argon2.Argon2PasswordEncoder.iterations:I
if_icmplt 5
iconst_0
ireturn
StackMap locals: org.bouncycastle.crypto.params.Argon2Parameters
StackMap stack:
5: iconst_1
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/springframework/security/crypto/argon2/Argon2PasswordEncoder;
0 6 1 encodedPassword Ljava/lang/String;
4 6 2 parameters Lorg/bouncycastle/crypto/params/Argon2Parameters;
MethodParameters:
Name Flags
encodedPassword
private static boolean constantTimeArrayEquals(byte[], byte[]);
descriptor: ([B[B)Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aload 0
arraylength
aload 1
arraylength
if_icmpeq 2
1: iconst_0
ireturn
2: StackMap locals:
StackMap stack:
iconst_0
istore 2
start local 2 3: iconst_0
istore 3
start local 3 4: goto 7
5: StackMap locals: int int
StackMap stack:
iload 2
aload 0
iload 3
baload
aload 1
iload 3
baload
ixor
ior
istore 2
6: iinc 3 1
StackMap locals:
StackMap stack:
7: iload 3
aload 0
arraylength
if_icmplt 5
end local 3 8: iload 2
ifne 9
iconst_1
ireturn
StackMap locals:
StackMap stack:
9: iconst_0
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 expected [B
0 10 1 actual [B
3 10 2 result I
4 8 3 i I
MethodParameters:
Name Flags
expected
actual
}
SourceFile: "Argon2PasswordEncoder.java"
InnerClasses:
public Builder = org.bouncycastle.crypto.params.Argon2Parameters$Builder of org.bouncycastle.crypto.params.Argon2Parameters
public Argon2Hash = org.springframework.security.crypto.argon2.Argon2EncodingUtils$Argon2Hash of org.springframework.security.crypto.argon2.Argon2EncodingUtils