public class org.apache.cassandra.security.EncryptionContext
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.apache.cassandra.security.EncryptionContext
super_class: java.lang.Object
{
public static final java.lang.String ENCRYPTION_CIPHER;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: "encCipher"
public static final java.lang.String ENCRYPTION_KEY_ALIAS;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: "encKeyAlias"
public static final java.lang.String ENCRYPTION_IV;
descriptor: Ljava/lang/String;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: "encIV"
private final org.apache.cassandra.config.TransparentDataEncryptionOptions tdeOptions;
descriptor: Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.apache.cassandra.io.compress.ICompressor compressor;
descriptor: Lorg/apache/cassandra/io/compress/ICompressor;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.apache.cassandra.security.CipherFactory cipherFactory;
descriptor: Lorg/apache/cassandra/security/CipherFactory;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final byte[] iv;
descriptor: [B
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final int chunkLength;
descriptor: I
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
new org.apache.cassandra.config.TransparentDataEncryptionOptions
dup
invokespecial org.apache.cassandra.config.TransparentDataEncryptionOptions.<init>:()V
invokespecial org.apache.cassandra.security.EncryptionContext.<init>:(Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;)V
1: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/security/EncryptionContext;
public void <init>(org.apache.cassandra.config.TransparentDataEncryptionOptions);
descriptor: (Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
aconst_null
iconst_1
invokespecial org.apache.cassandra.security.EncryptionContext.<init>:(Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;[BZ)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/security/EncryptionContext;
0 2 1 tdeOptions Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
MethodParameters:
Name Flags
tdeOptions
public void <init>(org.apache.cassandra.config.TransparentDataEncryptionOptions, byte[], boolean);
descriptor: (Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;[BZ)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=6, 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
aload 1
putfield org.apache.cassandra.security.EncryptionContext.tdeOptions:Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
2: aload 0
invokestatic java.util.Collections.emptyMap:()Ljava/util/Map;
invokestatic org.apache.cassandra.io.compress.LZ4Compressor.create:(Ljava/util/Map;)Lorg/apache/cassandra/io/compress/LZ4Compressor;
putfield org.apache.cassandra.security.EncryptionContext.compressor:Lorg/apache/cassandra/io/compress/ICompressor;
3: aload 0
aload 1
getfield org.apache.cassandra.config.TransparentDataEncryptionOptions.chunk_length_kb:I
sipush 1024
imul
putfield org.apache.cassandra.security.EncryptionContext.chunkLength:I
4: aload 0
aload 2
putfield org.apache.cassandra.security.EncryptionContext.iv:[B
5: aconst_null
astore 4
start local 4 6: aload 1
getfield org.apache.cassandra.config.TransparentDataEncryptionOptions.enabled:Z
ifeq 11
iload 3
ifeq 11
7: new org.apache.cassandra.security.CipherFactory
dup
aload 1
invokespecial org.apache.cassandra.security.CipherFactory.<init>:(Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;)V
astore 4
8: goto 11
9: StackMap locals: org.apache.cassandra.security.EncryptionContext org.apache.cassandra.config.TransparentDataEncryptionOptions byte[] int org.apache.cassandra.security.CipherFactory
StackMap stack: java.lang.Exception
astore 5
start local 5 10: new org.apache.cassandra.exceptions.ConfigurationException
dup
ldc "failed to load key provider for transparent data encryption"
aload 5
invokespecial org.apache.cassandra.exceptions.ConfigurationException.<init>:(Ljava/lang/String;Ljava/lang/Throwable;)V
athrow
end local 5 11: StackMap locals:
StackMap stack:
aload 0
aload 4
putfield org.apache.cassandra.security.EncryptionContext.cipherFactory:Lorg/apache/cassandra/security/CipherFactory;
12: return
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/apache/cassandra/security/EncryptionContext;
0 13 1 tdeOptions Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
0 13 2 iv [B
0 13 3 init Z
6 13 4 factory Lorg/apache/cassandra/security/CipherFactory;
10 11 5 e Ljava/lang/Exception;
Exception table:
from to target type
7 8 9 Class java.lang.Exception
RuntimeInvisibleAnnotations:
com.google.common.annotations.VisibleForTesting()
RuntimeInvisibleTypeAnnotations:
METHOD_RETURN
com.google.common.annotations.VisibleForTesting()
MethodParameters:
Name Flags
tdeOptions
iv
init
public org.apache.cassandra.io.compress.ICompressor getCompressor();
descriptor: ()Lorg/apache/cassandra/io/compress/ICompressor;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.security.EncryptionContext.compressor:Lorg/apache/cassandra/io/compress/ICompressor;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/security/EncryptionContext;
public javax.crypto.Cipher getEncryptor();
descriptor: ()Ljavax/crypto/Cipher;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.security.EncryptionContext.cipherFactory:Lorg/apache/cassandra/security/CipherFactory;
aload 0
getfield org.apache.cassandra.security.EncryptionContext.tdeOptions:Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
getfield org.apache.cassandra.config.TransparentDataEncryptionOptions.cipher:Ljava/lang/String;
aload 0
getfield org.apache.cassandra.security.EncryptionContext.tdeOptions:Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
getfield org.apache.cassandra.config.TransparentDataEncryptionOptions.key_alias:Ljava/lang/String;
invokevirtual org.apache.cassandra.security.CipherFactory.getEncryptor:(Ljava/lang/String;Ljava/lang/String;)Ljavax/crypto/Cipher;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/security/EncryptionContext;
Exceptions:
throws java.io.IOException
public javax.crypto.Cipher getDecryptor();
descriptor: ()Ljavax/crypto/Cipher;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.security.EncryptionContext.iv:[B
ifnull 1
aload 0
getfield org.apache.cassandra.security.EncryptionContext.iv:[B
arraylength
ifne 2
1: StackMap locals:
StackMap stack:
new java.lang.IllegalStateException
dup
ldc "no initialization vector (IV) found in this context"
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.security.EncryptionContext.cipherFactory:Lorg/apache/cassandra/security/CipherFactory;
aload 0
getfield org.apache.cassandra.security.EncryptionContext.tdeOptions:Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
getfield org.apache.cassandra.config.TransparentDataEncryptionOptions.cipher:Ljava/lang/String;
aload 0
getfield org.apache.cassandra.security.EncryptionContext.tdeOptions:Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
getfield org.apache.cassandra.config.TransparentDataEncryptionOptions.key_alias:Ljava/lang/String;
aload 0
getfield org.apache.cassandra.security.EncryptionContext.iv:[B
invokevirtual org.apache.cassandra.security.CipherFactory.getDecryptor:(Ljava/lang/String;Ljava/lang/String;[B)Ljavax/crypto/Cipher;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/apache/cassandra/security/EncryptionContext;
Exceptions:
throws java.io.IOException
public boolean isEnabled();
descriptor: ()Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.security.EncryptionContext.tdeOptions:Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
getfield org.apache.cassandra.config.TransparentDataEncryptionOptions.enabled:Z
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/security/EncryptionContext;
public int getChunkLength();
descriptor: ()I
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.security.EncryptionContext.chunkLength:I
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/security/EncryptionContext;
public byte[] getIV();
descriptor: ()[B
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.security.EncryptionContext.iv:[B
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/security/EncryptionContext;
public org.apache.cassandra.config.TransparentDataEncryptionOptions getTransparentDataEncryptionOptions();
descriptor: ()Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.apache.cassandra.security.EncryptionContext.tdeOptions:Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/cassandra/security/EncryptionContext;
public boolean equals(java.lang.Object);
descriptor: (Ljava/lang/Object;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
instanceof org.apache.cassandra.security.EncryptionContext
ifeq 1
aload 0
aload 1
checkcast org.apache.cassandra.security.EncryptionContext
invokevirtual org.apache.cassandra.security.EncryptionContext.equals:(Lorg/apache/cassandra/security/EncryptionContext;)Z
ifeq 1
iconst_1
ireturn
StackMap locals:
StackMap stack:
1: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/apache/cassandra/security/EncryptionContext;
0 2 1 o Ljava/lang/Object;
MethodParameters:
Name Flags
o
public boolean equals(org.apache.cassandra.security.EncryptionContext);
descriptor: (Lorg/apache/cassandra/security/EncryptionContext;)Z
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.security.EncryptionContext.tdeOptions:Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
aload 1
getfield org.apache.cassandra.security.EncryptionContext.tdeOptions:Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
invokestatic com.google.common.base.Objects.equal:(Ljava/lang/Object;Ljava/lang/Object;)Z
ifeq 4
1: aload 0
getfield org.apache.cassandra.security.EncryptionContext.compressor:Lorg/apache/cassandra/io/compress/ICompressor;
aload 1
getfield org.apache.cassandra.security.EncryptionContext.compressor:Lorg/apache/cassandra/io/compress/ICompressor;
invokestatic com.google.common.base.Objects.equal:(Ljava/lang/Object;Ljava/lang/Object;)Z
ifeq 4
2: aload 0
getfield org.apache.cassandra.security.EncryptionContext.iv:[B
aload 1
getfield org.apache.cassandra.security.EncryptionContext.iv:[B
invokestatic java.util.Arrays.equals:([B[B)Z
ifeq 4
3: iconst_1
ireturn
StackMap locals:
StackMap stack:
4: iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/apache/cassandra/security/EncryptionContext;
0 5 1 other Lorg/apache/cassandra/security/EncryptionContext;
MethodParameters:
Name Flags
other
public java.util.Map<java.lang.String, java.lang.String> toHeaderParameters();
descriptor: ()Ljava/util/Map;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: new java.util.HashMap
dup
iconst_3
invokespecial java.util.HashMap.<init>:(I)V
astore 1
start local 1 1: aload 0
getfield org.apache.cassandra.security.EncryptionContext.tdeOptions:Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
getfield org.apache.cassandra.config.TransparentDataEncryptionOptions.enabled:Z
ifeq 6
2: aload 1
ldc "encCipher"
aload 0
getfield org.apache.cassandra.security.EncryptionContext.tdeOptions:Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
getfield org.apache.cassandra.config.TransparentDataEncryptionOptions.cipher:Ljava/lang/String;
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
3: aload 1
ldc "encKeyAlias"
aload 0
getfield org.apache.cassandra.security.EncryptionContext.tdeOptions:Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
getfield org.apache.cassandra.config.TransparentDataEncryptionOptions.key_alias:Ljava/lang/String;
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
4: aload 0
getfield org.apache.cassandra.security.EncryptionContext.iv:[B
ifnull 6
aload 0
getfield org.apache.cassandra.security.EncryptionContext.iv:[B
arraylength
ifle 6
5: aload 1
ldc "encIV"
aload 0
getfield org.apache.cassandra.security.EncryptionContext.iv:[B
invokestatic org.apache.cassandra.utils.Hex.bytesToHex:([B)Ljava/lang/String;
invokeinterface java.util.Map.put:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
pop
6: StackMap locals: java.util.Map
StackMap stack:
aload 1
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/apache/cassandra/security/EncryptionContext;
1 7 1 map Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
Signature: ()Ljava/util/Map<Ljava/lang/String;Ljava/lang/String;>;
public static org.apache.cassandra.security.EncryptionContext createFromMap(java.util.Map<?, ?>, org.apache.cassandra.security.EncryptionContext);
descriptor: (Ljava/util/Map;Lorg/apache/cassandra/security/EncryptionContext;)Lorg/apache/cassandra/security/EncryptionContext;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=7, args_size=2
start local 0 start local 1 0: aload 0
ifnull 1
aload 0
invokeinterface java.util.Map.isEmpty:()Z
ifeq 2
1: StackMap locals:
StackMap stack:
new org.apache.cassandra.security.EncryptionContext
dup
new org.apache.cassandra.config.TransparentDataEncryptionOptions
dup
iconst_0
invokespecial org.apache.cassandra.config.TransparentDataEncryptionOptions.<init>:(Z)V
invokespecial org.apache.cassandra.security.EncryptionContext.<init>:(Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;)V
areturn
2: StackMap locals:
StackMap stack:
aload 0
ldc "encKeyAlias"
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.String
astore 2
start local 2 3: aload 0
ldc "encCipher"
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.String
astore 3
start local 3 4: aload 0
ldc "encIV"
invokeinterface java.util.Map.get:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast java.lang.String
astore 4
start local 4 5: aload 2
ifnull 6
aload 3
ifnonnull 7
6: StackMap locals: java.lang.String java.lang.String java.lang.String
StackMap stack:
new org.apache.cassandra.security.EncryptionContext
dup
new org.apache.cassandra.config.TransparentDataEncryptionOptions
dup
iconst_0
invokespecial org.apache.cassandra.config.TransparentDataEncryptionOptions.<init>:(Z)V
invokespecial org.apache.cassandra.security.EncryptionContext.<init>:(Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;)V
areturn
7: StackMap locals:
StackMap stack:
new org.apache.cassandra.config.TransparentDataEncryptionOptions
dup
aload 3
aload 2
aload 1
invokevirtual org.apache.cassandra.security.EncryptionContext.getTransparentDataEncryptionOptions:()Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
getfield org.apache.cassandra.config.TransparentDataEncryptionOptions.key_provider:Lorg/apache/cassandra/config/ParameterizedClass;
invokespecial org.apache.cassandra.config.TransparentDataEncryptionOptions.<init>:(Ljava/lang/String;Ljava/lang/String;Lorg/apache/cassandra/config/ParameterizedClass;)V
astore 5
start local 5 8: aload 4
ifnull 9
aload 4
invokestatic org.apache.cassandra.utils.Hex.hexToBytes:(Ljava/lang/String;)[B
goto 10
StackMap locals: org.apache.cassandra.config.TransparentDataEncryptionOptions
StackMap stack:
9: aconst_null
StackMap locals:
StackMap stack: byte[]
10: astore 6
start local 6 11: new org.apache.cassandra.security.EncryptionContext
dup
aload 5
aload 6
iconst_1
invokespecial org.apache.cassandra.security.EncryptionContext.<init>:(Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;[BZ)V
areturn
end local 6 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 12 0 parameters Ljava/util/Map<**>;
0 12 1 encryptionContext Lorg/apache/cassandra/security/EncryptionContext;
3 12 2 keyAlias Ljava/lang/String;
4 12 3 cipher Ljava/lang/String;
5 12 4 ivString Ljava/lang/String;
8 12 5 tdeOptions Lorg/apache/cassandra/config/TransparentDataEncryptionOptions;
11 12 6 iv [B
Signature: (Ljava/util/Map<**>;Lorg/apache/cassandra/security/EncryptionContext;)Lorg/apache/cassandra/security/EncryptionContext;
MethodParameters:
Name Flags
parameters
encryptionContext
}
SourceFile: "EncryptionContext.java"