final class org.springframework.security.crypto.encrypt.CipherUtils
minor version: 0
major version: 59
flags: flags: (0x0030) ACC_FINAL, ACC_SUPER
this_class: org.springframework.security.crypto.encrypt.CipherUtils
super_class: java.lang.Object
{
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 Lorg/springframework/security/crypto/encrypt/CipherUtils;
static javax.crypto.SecretKey newSecretKey(java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;)Ljavax/crypto/SecretKey;
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
new javax.crypto.spec.PBEKeySpec
dup
aload 1
invokevirtual java.lang.String.toCharArray:()[C
invokespecial javax.crypto.spec.PBEKeySpec.<init>:([C)V
invokestatic org.springframework.security.crypto.encrypt.CipherUtils.newSecretKey:(Ljava/lang/String;Ljavax/crypto/spec/PBEKeySpec;)Ljavax/crypto/SecretKey;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 algorithm Ljava/lang/String;
0 1 1 password Ljava/lang/String;
MethodParameters:
Name Flags
algorithm
password
static javax.crypto.SecretKey newSecretKey(java.lang.String, javax.crypto.spec.PBEKeySpec);
descriptor: (Ljava/lang/String;Ljavax/crypto/spec/PBEKeySpec;)Ljavax/crypto/SecretKey;
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 0
invokestatic javax.crypto.SecretKeyFactory.getInstance:(Ljava/lang/String;)Ljavax/crypto/SecretKeyFactory;
astore 2
start local 2 1: aload 2
aload 1
invokevirtual javax.crypto.SecretKeyFactory.generateSecret:(Ljava/security/spec/KeySpec;)Ljavax/crypto/SecretKey;
2: areturn
end local 2 3: StackMap locals:
StackMap stack: java.security.NoSuchAlgorithmException
astore 2
start local 2 4: new java.lang.IllegalArgumentException
dup
ldc "Not a valid encryption algorithm"
aload 2
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 5: StackMap locals:
StackMap stack: java.security.spec.InvalidKeySpecException
astore 2
start local 2 6: new java.lang.IllegalArgumentException
dup
ldc "Not a valid secret key"
aload 2
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 algorithm Ljava/lang/String;
0 7 1 keySpec Ljavax/crypto/spec/PBEKeySpec;
1 3 2 factory Ljavax/crypto/SecretKeyFactory;
4 5 2 ex Ljava/security/NoSuchAlgorithmException;
6 7 2 ex Ljava/security/spec/InvalidKeySpecException;
Exception table:
from to target type
0 2 3 Class java.security.NoSuchAlgorithmException
0 2 5 Class java.security.spec.InvalidKeySpecException
MethodParameters:
Name Flags
algorithm
keySpec
static javax.crypto.Cipher newCipher(java.lang.String);
descriptor: (Ljava/lang/String;)Ljavax/crypto/Cipher;
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=2, args_size=1
start local 0 0: aload 0
invokestatic javax.crypto.Cipher.getInstance:(Ljava/lang/String;)Ljavax/crypto/Cipher;
1: areturn
2: StackMap locals:
StackMap stack: java.security.NoSuchAlgorithmException
astore 1
start local 1 3: new java.lang.IllegalArgumentException
dup
ldc "Not a valid encryption algorithm"
aload 1
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 1 4: StackMap locals:
StackMap stack: javax.crypto.NoSuchPaddingException
astore 1
start local 1 5: new java.lang.IllegalStateException
dup
ldc "Should not happen"
aload 1
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 algorithm Ljava/lang/String;
3 4 1 ex Ljava/security/NoSuchAlgorithmException;
5 6 1 ex Ljavax/crypto/NoSuchPaddingException;
Exception table:
from to target type
0 1 2 Class java.security.NoSuchAlgorithmException
0 1 4 Class javax.crypto.NoSuchPaddingException
MethodParameters:
Name Flags
algorithm
static <T extends java.security.spec.AlgorithmParameterSpec> T getParameterSpec(javax.crypto.Cipher, java.lang.Class<T>);
descriptor: (Ljavax/crypto/Cipher;Ljava/lang/Class;)Ljava/security/spec/AlgorithmParameterSpec;
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual javax.crypto.Cipher.getParameters:()Ljava/security/AlgorithmParameters;
aload 1
invokevirtual java.security.AlgorithmParameters.getParameterSpec:(Ljava/lang/Class;)Ljava/security/spec/AlgorithmParameterSpec;
1: areturn
2: StackMap locals:
StackMap stack: java.security.spec.InvalidParameterSpecException
astore 2
start local 2 3: new java.lang.IllegalArgumentException
dup
ldc "Unable to access parameter"
aload 2
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 cipher Ljavax/crypto/Cipher;
0 4 1 parameterSpecClass Ljava/lang/Class<TT;>;
3 4 2 ex Ljava/security/spec/InvalidParameterSpecException;
Exception table:
from to target type
0 1 2 Class java.security.spec.InvalidParameterSpecException
Signature: <T::Ljava/security/spec/AlgorithmParameterSpec;>(Ljavax/crypto/Cipher;Ljava/lang/Class<TT;>;)TT;
MethodParameters:
Name Flags
cipher
parameterSpecClass
static void initCipher(javax.crypto.Cipher, int, javax.crypto.SecretKey);
descriptor: (Ljavax/crypto/Cipher;ILjavax/crypto/SecretKey;)V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
iload 1
aload 2
aconst_null
invokestatic org.springframework.security.crypto.encrypt.CipherUtils.initCipher:(Ljavax/crypto/Cipher;ILjavax/crypto/SecretKey;Ljava/security/spec/AlgorithmParameterSpec;)V
1: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 cipher Ljavax/crypto/Cipher;
0 2 1 mode I
0 2 2 secretKey Ljavax/crypto/SecretKey;
MethodParameters:
Name Flags
cipher
mode
secretKey
static void initCipher(javax.crypto.Cipher, int, javax.crypto.SecretKey, byte[], int);
descriptor: (Ljavax/crypto/Cipher;ILjavax/crypto/SecretKey;[BI)V
flags: (0x0008) ACC_STATIC
Code:
stack=7, locals=5, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 0
iload 1
aload 2
new javax.crypto.spec.PBEParameterSpec
dup
aload 3
iload 4
invokespecial javax.crypto.spec.PBEParameterSpec.<init>:([BI)V
invokestatic org.springframework.security.crypto.encrypt.CipherUtils.initCipher:(Ljavax/crypto/Cipher;ILjavax/crypto/SecretKey;Ljava/security/spec/AlgorithmParameterSpec;)V
1: return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 cipher Ljavax/crypto/Cipher;
0 2 1 mode I
0 2 2 secretKey Ljavax/crypto/SecretKey;
0 2 3 salt [B
0 2 4 iterationCount I
MethodParameters:
Name Flags
cipher
mode
secretKey
salt
iterationCount
static void initCipher(javax.crypto.Cipher, int, javax.crypto.SecretKey, java.security.spec.AlgorithmParameterSpec);
descriptor: (Ljavax/crypto/Cipher;ILjavax/crypto/SecretKey;Ljava/security/spec/AlgorithmParameterSpec;)V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=5, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 3
ifnull 3
1: aload 0
iload 1
aload 2
aload 3
invokevirtual javax.crypto.Cipher.init:(ILjava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;)V
2: goto 9
3: StackMap locals:
StackMap stack:
aload 0
iload 1
aload 2
invokevirtual javax.crypto.Cipher.init:(ILjava/security/Key;)V
4: goto 9
5: StackMap locals:
StackMap stack: java.security.InvalidKeyException
astore 4
start local 4 6: new java.lang.IllegalArgumentException
dup
ldc "Unable to initialize due to invalid secret key"
aload 4
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 4 7: StackMap locals:
StackMap stack: java.security.InvalidAlgorithmParameterException
astore 4
start local 4 8: new java.lang.IllegalStateException
dup
ldc "Unable to initialize due to invalid decryption parameter spec"
aload 4
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 4 9: StackMap locals:
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 cipher Ljavax/crypto/Cipher;
0 10 1 mode I
0 10 2 secretKey Ljavax/crypto/SecretKey;
0 10 3 parameterSpec Ljava/security/spec/AlgorithmParameterSpec;
6 7 4 ex Ljava/security/InvalidKeyException;
8 9 4 ex Ljava/security/InvalidAlgorithmParameterException;
Exception table:
from to target type
0 4 5 Class java.security.InvalidKeyException
0 4 7 Class java.security.InvalidAlgorithmParameterException
MethodParameters:
Name Flags
cipher
mode
secretKey
parameterSpec
static byte[] doFinal(javax.crypto.Cipher, byte[]);
descriptor: (Ljavax/crypto/Cipher;[B)[B
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual javax.crypto.Cipher.doFinal:([B)[B
1: areturn
2: StackMap locals:
StackMap stack: javax.crypto.IllegalBlockSizeException
astore 2
start local 2 3: new java.lang.IllegalStateException
dup
ldc "Unable to invoke Cipher due to illegal block size"
aload 2
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 4: StackMap locals:
StackMap stack: javax.crypto.BadPaddingException
astore 2
start local 2 5: new java.lang.IllegalStateException
dup
ldc "Unable to invoke Cipher due to bad padding"
aload 2
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 cipher Ljavax/crypto/Cipher;
0 6 1 input [B
3 4 2 ex Ljavax/crypto/IllegalBlockSizeException;
5 6 2 ex Ljavax/crypto/BadPaddingException;
Exception table:
from to target type
0 1 2 Class javax.crypto.IllegalBlockSizeException
0 1 4 Class javax.crypto.BadPaddingException
MethodParameters:
Name Flags
cipher
input
}
SourceFile: "CipherUtils.java"