14 internal static class CipherBlockChaining
17#if FIRST_PASS == false
19 static AESCryptAccessor aesCryptAccessor;
21 static AESCryptAccessor AESCryptAccessor =>
JVM.
Internal.BaseAccessors.Get(
ref aesCryptAccessor);
37 [MethodImpl(MethodImplOptions.AggressiveInlining)]
38 public static int DecryptAESCrypt(
object self,
byte[] cipher,
int cipherOffset,
int cipherLen,
byte[] plain,
int plainOffset)
41 throw new NotImplementedException();
43#if NETCOREAPP3_0_OR_GREATER
44 if (plain == cipher ||
self is not global::com.sun.crypto.provider.CipherBlockChaining
47 embeddedCipher: global::com.sun.crypto.provider.AESCrypt aes
53 var k = AESCryptAccessor.K(aes);
55 if (CipherBlockChaining_x86.IsSupported)
57 return CipherBlockChaining_x86.DecryptAESCrypt(cipher.AsSpan(cipherOffset), plain.AsSpan(plainOffset), k, r, cipherLen);
61 if (CipherBlockChaining_Arm.IsSupported)
63 return CipherBlockChaining_Arm.DecryptAESCrypt(cipher.AsSpan(cipherOffset), plain.AsSpan(plainOffset), k, r, cipherLen);
84 [MethodImpl(MethodImplOptions.AggressiveInlining)]
85 public static int EncryptAESCrypt(
object self,
byte[] plain,
int plainOffset,
int plainLen,
byte[] cipher,
int cipherOffset)
88 throw new NotImplementedException();
90#if NETCOREAPP3_0_OR_GREATER
91 if (
self is not global::com.sun.crypto.provider.CipherBlockChaining
94 embeddedCipher: global::com.sun.crypto.provider.AESCrypt aes
100 var k = AESCryptAccessor.K(aes);
102 if (AESCrypt_x86.IsSupported)
104 return CipherBlockChaining_x86.EncryptAESCrypt(plain.AsSpan(plainOffset), cipher.AsSpan(cipherOffset), k, r, plainLen);
108 if (CipherBlockChaining_Arm.IsSupported)
110 return CipherBlockChaining_Arm.EncryptAESCrypt(plain.AsSpan(plainOffset), cipher.AsSpan(cipherOffset), k, r, plainLen);
Main state of the running JVM.