public class org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder 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.bcrypt.BCryptPasswordEncoder
super_class: java.lang.Object
{
private java.util.regex.Pattern BCRYPT_PATTERN;
descriptor: Ljava/util/regex/Pattern;
flags: (0x0002) ACC_PRIVATE
private final org.apache.commons.logging.Log logger;
descriptor: Lorg/apache/commons/logging/Log;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int strength;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder$BCryptVersion version;
descriptor: Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder$BCryptVersion;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.security.SecureRandom random;
descriptor: Ljava/security/SecureRandom;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
iconst_m1
invokespecial org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.<init>:(I)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder;
public void <init>(int);
descriptor: (I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
iload 1
aconst_null
invokespecial org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.<init>:(ILjava/security/SecureRandom;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder;
0 2 1 strength I
MethodParameters:
Name Flags
strength
public void <init>(org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder$BCryptVersion);
descriptor: (Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder$BCryptVersion;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
aconst_null
invokespecial org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.<init>:(Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder$BCryptVersion;Ljava/security/SecureRandom;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder;
0 2 1 version Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder$BCryptVersion;
MethodParameters:
Name Flags
version
public void <init>(org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder$BCryptVersion, java.security.SecureRandom);
descriptor: (Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder$BCryptVersion;Ljava/security/SecureRandom;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
iconst_m1
aload 2
invokespecial org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.<init>:(Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder$BCryptVersion;ILjava/security/SecureRandom;)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder;
0 2 1 version Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder$BCryptVersion;
0 2 2 random Ljava/security/SecureRandom;
MethodParameters:
Name Flags
version
random
public void <init>(int, java.security.SecureRandom);
descriptor: (ILjava/security/SecureRandom;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getstatic org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder$BCryptVersion.$2A:Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder$BCryptVersion;
iload 1
aload 2
invokespecial org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.<init>:(Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder$BCryptVersion;ILjava/security/SecureRandom;)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder;
0 2 1 strength I
0 2 2 random Ljava/security/SecureRandom;
MethodParameters:
Name Flags
strength
random
public void <init>(org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder$BCryptVersion, int);
descriptor: (Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder$BCryptVersion;I)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
iload 2
aconst_null
invokespecial org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.<init>:(Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder$BCryptVersion;ILjava/security/SecureRandom;)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder;
0 2 1 version Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder$BCryptVersion;
0 2 2 strength I
MethodParameters:
Name Flags
version
strength
public void <init>(org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder$BCryptVersion, int, java.security.SecureRandom);
descriptor: (Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder$BCryptVersion;ILjava/security/SecureRandom;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
ldc "\\A\\$2(a|y|b)?\\$(\\d\\d)\\$[./0-9A-Za-z]{53}"
invokestatic java.util.regex.Pattern.compile:(Ljava/lang/String;)Ljava/util/regex/Pattern;
putfield org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.BCRYPT_PATTERN:Ljava/util/regex/Pattern;
2: 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.bcrypt.BCryptPasswordEncoder.logger:Lorg/apache/commons/logging/Log;
3: iload 2
iconst_m1
if_icmpeq 5
iload 2
iconst_4
if_icmplt 4
iload 2
bipush 31
if_icmple 5
4: StackMap locals: org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder$BCryptVersion int java.security.SecureRandom
StackMap stack:
new java.lang.IllegalArgumentException
dup
ldc "Bad strength"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
aload 0
aload 1
putfield org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.version:Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder$BCryptVersion;
6: aload 0
iload 2
iconst_m1
if_icmpne 7
bipush 10
goto 8
StackMap locals:
StackMap stack: org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
7: iload 2
StackMap locals: org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder$BCryptVersion int java.security.SecureRandom
StackMap stack: org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder int
8: putfield org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.strength:I
9: aload 0
aload 3
putfield org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.random:Ljava/security/SecureRandom;
10: return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder;
0 11 1 version Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder$BCryptVersion;
0 11 2 strength I
0 11 3 random Ljava/security/SecureRandom;
MethodParameters:
Name Flags
version
strength
random
public java.lang.String encode(java.lang.CharSequence);
descriptor: (Ljava/lang/CharSequence;)Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 1
ifnonnull 2
1: new java.lang.IllegalArgumentException
dup
ldc "rawPassword cannot be null"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.getSalt:()Ljava/lang/String;
astore 2
start local 2 3: aload 1
invokeinterface java.lang.CharSequence.toString:()Ljava/lang/String;
aload 2
invokestatic org.springframework.security.crypto.bcrypt.BCrypt.hashpw:(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder;
0 4 1 rawPassword Ljava/lang/CharSequence;
3 4 2 salt Ljava/lang/String;
MethodParameters:
Name Flags
rawPassword
private java.lang.String getSalt();
descriptor: ()Ljava/lang/String;
flags: (0x0002) ACC_PRIVATE
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.random:Ljava/security/SecureRandom;
ifnull 2
1: aload 0
getfield org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.version:Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder$BCryptVersion;
invokevirtual org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder$BCryptVersion.getVersion:()Ljava/lang/String;
aload 0
getfield org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.strength:I
aload 0
getfield org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.random:Ljava/security/SecureRandom;
invokestatic org.springframework.security.crypto.bcrypt.BCrypt.gensalt:(Ljava/lang/String;ILjava/security/SecureRandom;)Ljava/lang/String;
areturn
2: StackMap locals:
StackMap stack:
aload 0
getfield org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.version:Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder$BCryptVersion;
invokevirtual org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder$BCryptVersion.getVersion:()Ljava/lang/String;
aload 0
getfield org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.strength:I
invokestatic org.springframework.security.crypto.bcrypt.BCrypt.gensalt:(Ljava/lang/String;I)Ljava/lang/String;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder;
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=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
ifnonnull 2
1: new java.lang.IllegalArgumentException
dup
ldc "rawPassword cannot be null"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 2
ifnull 3
aload 2
invokevirtual java.lang.String.length:()I
ifne 5
3: StackMap locals:
StackMap stack:
aload 0
getfield org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.logger:Lorg/apache/commons/logging/Log;
ldc "Empty encoded password"
invokeinterface org.apache.commons.logging.Log.warn:(Ljava/lang/Object;)V
4: iconst_0
ireturn
5: StackMap locals:
StackMap stack:
aload 0
getfield org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.BCRYPT_PATTERN:Ljava/util/regex/Pattern;
aload 2
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
invokevirtual java.util.regex.Matcher.matches:()Z
ifne 8
6: aload 0
getfield org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.logger:Lorg/apache/commons/logging/Log;
ldc "Encoded password does not look like BCrypt"
invokeinterface org.apache.commons.logging.Log.warn:(Ljava/lang/Object;)V
7: iconst_0
ireturn
8: StackMap locals:
StackMap stack:
aload 1
invokeinterface java.lang.CharSequence.toString:()Ljava/lang/String;
aload 2
invokestatic org.springframework.security.crypto.bcrypt.BCrypt.checkpw:(Ljava/lang/String;Ljava/lang/String;)Z
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder;
0 9 1 rawPassword Ljava/lang/CharSequence;
0 9 2 encodedPassword Ljava/lang/String;
MethodParameters:
Name Flags
rawPassword
encodedPassword
public boolean upgradeEncoding(java.lang.String);
descriptor: (Ljava/lang/String;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, 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.bcrypt.BCryptPasswordEncoder.logger:Lorg/apache/commons/logging/Log;
ldc "Empty encoded password"
invokeinterface org.apache.commons.logging.Log.warn:(Ljava/lang/Object;)V
2: iconst_0
ireturn
3: StackMap locals:
StackMap stack:
aload 0
getfield org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.BCRYPT_PATTERN:Ljava/util/regex/Pattern;
aload 1
invokevirtual java.util.regex.Pattern.matcher:(Ljava/lang/CharSequence;)Ljava/util/regex/Matcher;
astore 2
start local 2 4: aload 2
invokevirtual java.util.regex.Matcher.matches:()Z
ifne 6
5: new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "Encoded password does not look like BCrypt: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
6: StackMap locals: java.util.regex.Matcher
StackMap stack:
aload 2
iconst_2
invokevirtual java.util.regex.Matcher.group:(I)Ljava/lang/String;
invokestatic java.lang.Integer.parseInt:(Ljava/lang/String;)I
istore 3
start local 3 7: iload 3
aload 0
getfield org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder.strength:I
if_icmpge 8
iconst_1
ireturn
StackMap locals: int
StackMap stack:
8: iconst_0
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/springframework/security/crypto/bcrypt/BCryptPasswordEncoder;
0 9 1 encodedPassword Ljava/lang/String;
4 9 2 matcher Ljava/util/regex/Matcher;
7 9 3 strength I
MethodParameters:
Name Flags
encodedPassword
}
SourceFile: "BCryptPasswordEncoder.java"
NestMembers:
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder$BCryptVersion
InnerClasses:
public final BCryptVersion = org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder$BCryptVersion of org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder