Skip to content

Commit 2363bb3

Browse files
committed
Add Base* interfaces/implementations for streaming encryption/decryption
1 parent 88e1269 commit 2363bb3

File tree

10 files changed

+1026
-0
lines changed

10 files changed

+1026
-0
lines changed
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
public final class dev/whyoleg/cryptography/providers/base/BytesKt {
2+
public static final fun checkBounds (III)V
3+
public static final fun ensureSizeExactly ([BI)[B
4+
public static final fun getEmptyByteArray ()[B
5+
}
6+
7+
public final class dev/whyoleg/cryptography/providers/base/algorithms/BaseAesImplicitIvDecryptFunction : dev/whyoleg/cryptography/providers/base/operations/CipherFunction {
8+
public fun <init> (ILkotlin/jvm/functions/Function2;)V
9+
public fun transform ([BII)[B
10+
public fun transformedSink (Lkotlinx/io/RawSink;)Lkotlinx/io/RawSink;
11+
public fun transformedSource (Lkotlinx/io/RawSource;)Lkotlinx/io/RawSource;
12+
}
13+
14+
public final class dev/whyoleg/cryptography/providers/base/algorithms/BaseAesImplicitIvEncryptFunction : dev/whyoleg/cryptography/providers/base/operations/CipherFunction {
15+
public fun <init> ([BLdev/whyoleg/cryptography/providers/base/operations/CipherFunction;)V
16+
public fun transform ([BII)[B
17+
public fun transformedSink (Lkotlinx/io/RawSink;)Lkotlinx/io/RawSink;
18+
public fun transformedSource (Lkotlinx/io/RawSource;)Lkotlinx/io/RawSource;
19+
}
20+
21+
public abstract interface class dev/whyoleg/cryptography/providers/base/algorithms/BaseAesIvAuthenticatedCipher : dev/whyoleg/cryptography/algorithms/AES$IvAuthenticatedCipher, dev/whyoleg/cryptography/providers/base/algorithms/BaseAesIvAuthenticatedDecryptor, dev/whyoleg/cryptography/providers/base/algorithms/BaseAesIvAuthenticatedEncryptor, dev/whyoleg/cryptography/providers/base/operations/BaseAuthenticatedCipher {
22+
}
23+
24+
public abstract interface class dev/whyoleg/cryptography/providers/base/algorithms/BaseAesIvAuthenticatedDecryptor : dev/whyoleg/cryptography/algorithms/AES$IvAuthenticatedDecryptor, dev/whyoleg/cryptography/providers/base/operations/BaseAuthenticatedDecryptor {
25+
public abstract fun createDecryptFunctionWithIv ([B[B)Ldev/whyoleg/cryptography/providers/base/operations/CipherFunction;
26+
public fun decryptWithIvBlocking ([B[B[B)[B
27+
public fun decryptingSinkWithIv ([BLkotlinx/io/RawSink;[B)Lkotlinx/io/RawSink;
28+
public fun decryptingSourceWithIv ([BLkotlinx/io/RawSource;[B)Lkotlinx/io/RawSource;
29+
}
30+
31+
public abstract interface class dev/whyoleg/cryptography/providers/base/algorithms/BaseAesIvAuthenticatedEncryptor : dev/whyoleg/cryptography/algorithms/AES$IvAuthenticatedEncryptor, dev/whyoleg/cryptography/providers/base/operations/BaseAuthenticatedEncryptor {
32+
public abstract fun createEncryptFunctionWithIv ([B[B)Ldev/whyoleg/cryptography/providers/base/operations/CipherFunction;
33+
public fun encryptWithIvBlocking ([B[B[B)[B
34+
public fun encryptingSinkWithIv ([BLkotlinx/io/RawSink;[B)Lkotlinx/io/RawSink;
35+
public fun encryptingSourceWithIv ([BLkotlinx/io/RawSource;[B)Lkotlinx/io/RawSource;
36+
}
37+
38+
public abstract interface class dev/whyoleg/cryptography/providers/base/algorithms/BaseAesIvCipher : dev/whyoleg/cryptography/algorithms/AES$IvCipher, dev/whyoleg/cryptography/providers/base/algorithms/BaseAesIvDecryptor, dev/whyoleg/cryptography/providers/base/algorithms/BaseAesIvEncryptor, dev/whyoleg/cryptography/providers/base/operations/BaseCipher {
39+
}
40+
41+
public abstract interface class dev/whyoleg/cryptography/providers/base/algorithms/BaseAesIvDecryptor : dev/whyoleg/cryptography/algorithms/AES$IvDecryptor, dev/whyoleg/cryptography/providers/base/operations/BaseDecryptor {
42+
public abstract fun createDecryptFunctionWithIv ([B)Ldev/whyoleg/cryptography/providers/base/operations/CipherFunction;
43+
public fun decryptWithIvBlocking ([B[B)[B
44+
public fun decryptingSinkWithIv ([BLkotlinx/io/RawSink;)Lkotlinx/io/RawSink;
45+
public fun decryptingSourceWithIv ([BLkotlinx/io/RawSource;)Lkotlinx/io/RawSource;
46+
}
47+
48+
public abstract interface class dev/whyoleg/cryptography/providers/base/algorithms/BaseAesIvEncryptor : dev/whyoleg/cryptography/algorithms/AES$IvEncryptor, dev/whyoleg/cryptography/providers/base/operations/BaseEncryptor {
49+
public abstract fun createEncryptFunctionWithIv ([B)Ldev/whyoleg/cryptography/providers/base/operations/CipherFunction;
50+
public fun encryptWithIvBlocking ([B[B)[B
51+
public fun encryptingSinkWithIv ([BLkotlinx/io/RawSink;)Lkotlinx/io/RawSink;
52+
public fun encryptingSourceWithIv ([BLkotlinx/io/RawSource;)Lkotlinx/io/RawSource;
53+
}
54+
55+
public final class dev/whyoleg/cryptography/providers/base/operations/AccumulatingCipherFunction : dev/whyoleg/cryptography/providers/base/operations/BaseCipherFunction {
56+
public fun <init> (Lkotlin/jvm/functions/Function1;)V
57+
public fun close ()V
58+
}
59+
60+
public abstract interface class dev/whyoleg/cryptography/providers/base/operations/BaseAuthenticatedCipher : dev/whyoleg/cryptography/operations/AuthenticatedCipher, dev/whyoleg/cryptography/providers/base/operations/BaseAuthenticatedDecryptor, dev/whyoleg/cryptography/providers/base/operations/BaseAuthenticatedEncryptor, dev/whyoleg/cryptography/providers/base/operations/BaseCipher {
61+
}
62+
63+
public abstract interface class dev/whyoleg/cryptography/providers/base/operations/BaseAuthenticatedDecryptor : dev/whyoleg/cryptography/operations/AuthenticatedDecryptor, dev/whyoleg/cryptography/providers/base/operations/BaseDecryptor {
64+
public fun createDecryptFunction ()Ldev/whyoleg/cryptography/providers/base/operations/CipherFunction;
65+
public abstract fun createDecryptFunction ([B)Ldev/whyoleg/cryptography/providers/base/operations/CipherFunction;
66+
public fun decryptBlocking ([B)[B
67+
public fun decryptBlocking ([B[B)[B
68+
public fun decryptingSink (Lkotlinx/io/RawSink;)Lkotlinx/io/RawSink;
69+
public fun decryptingSink (Lkotlinx/io/RawSink;[B)Lkotlinx/io/RawSink;
70+
public fun decryptingSource (Lkotlinx/io/RawSource;)Lkotlinx/io/RawSource;
71+
public fun decryptingSource (Lkotlinx/io/RawSource;[B)Lkotlinx/io/RawSource;
72+
}
73+
74+
public abstract interface class dev/whyoleg/cryptography/providers/base/operations/BaseAuthenticatedEncryptor : dev/whyoleg/cryptography/operations/AuthenticatedEncryptor, dev/whyoleg/cryptography/providers/base/operations/BaseEncryptor {
75+
public fun createEncryptFunction ()Ldev/whyoleg/cryptography/providers/base/operations/CipherFunction;
76+
public abstract fun createEncryptFunction ([B)Ldev/whyoleg/cryptography/providers/base/operations/CipherFunction;
77+
public fun encryptBlocking ([B)[B
78+
public fun encryptBlocking ([B[B)[B
79+
public fun encryptingSink (Lkotlinx/io/RawSink;)Lkotlinx/io/RawSink;
80+
public fun encryptingSink (Lkotlinx/io/RawSink;[B)Lkotlinx/io/RawSink;
81+
public fun encryptingSource (Lkotlinx/io/RawSource;)Lkotlinx/io/RawSource;
82+
public fun encryptingSource (Lkotlinx/io/RawSource;[B)Lkotlinx/io/RawSource;
83+
}
84+
85+
public abstract interface class dev/whyoleg/cryptography/providers/base/operations/BaseCipher : dev/whyoleg/cryptography/operations/Cipher, dev/whyoleg/cryptography/providers/base/operations/BaseDecryptor, dev/whyoleg/cryptography/providers/base/operations/BaseEncryptor {
86+
}
87+
88+
public abstract class dev/whyoleg/cryptography/providers/base/operations/BaseCipherFunction : dev/whyoleg/cryptography/providers/base/operations/CipherFunction, java/lang/AutoCloseable {
89+
public fun <init> ()V
90+
protected abstract fun finalizeIntoByteArray ([BI)I
91+
public static synthetic fun finalizeIntoByteArray$default (Ldev/whyoleg/cryptography/providers/base/operations/BaseCipherFunction;[BIILjava/lang/Object;)I
92+
protected fun finalizeToByteArray ()[B
93+
protected abstract fun getBlockSize ()I
94+
protected fun maxInputSize (II)I
95+
protected abstract fun maxOutputSize (I)I
96+
public fun transform ([BII)[B
97+
protected fun transformAndFinalizeIntoByteArray ([B[BIII)I
98+
public static synthetic fun transformAndFinalizeIntoByteArray$default (Ldev/whyoleg/cryptography/providers/base/operations/BaseCipherFunction;[B[BIIIILjava/lang/Object;)I
99+
protected fun transformAndFinalizeToByteArray ([BII)[B
100+
public static synthetic fun transformAndFinalizeToByteArray$default (Ldev/whyoleg/cryptography/providers/base/operations/BaseCipherFunction;[BIIILjava/lang/Object;)[B
101+
protected abstract fun transformIntoByteArray ([B[BIII)I
102+
public static synthetic fun transformIntoByteArray$default (Ldev/whyoleg/cryptography/providers/base/operations/BaseCipherFunction;[B[BIIIILjava/lang/Object;)I
103+
protected fun transformToByteArray ([BII)[B
104+
public static synthetic fun transformToByteArray$default (Ldev/whyoleg/cryptography/providers/base/operations/BaseCipherFunction;[BIIILjava/lang/Object;)[B
105+
public fun transformedSink (Lkotlinx/io/RawSink;)Lkotlinx/io/RawSink;
106+
public fun transformedSource (Lkotlinx/io/RawSource;)Lkotlinx/io/RawSource;
107+
}
108+
109+
public abstract interface class dev/whyoleg/cryptography/providers/base/operations/BaseDecryptor : dev/whyoleg/cryptography/operations/Decryptor {
110+
public abstract fun createDecryptFunction ()Ldev/whyoleg/cryptography/providers/base/operations/CipherFunction;
111+
public fun decryptBlocking ([B)[B
112+
public fun decryptingSink (Lkotlinx/io/RawSink;)Lkotlinx/io/RawSink;
113+
public fun decryptingSource (Lkotlinx/io/RawSource;)Lkotlinx/io/RawSource;
114+
}
115+
116+
public abstract interface class dev/whyoleg/cryptography/providers/base/operations/BaseEncryptor : dev/whyoleg/cryptography/operations/Encryptor {
117+
public abstract fun createEncryptFunction ()Ldev/whyoleg/cryptography/providers/base/operations/CipherFunction;
118+
public fun encryptBlocking ([B)[B
119+
public fun encryptingSink (Lkotlinx/io/RawSink;)Lkotlinx/io/RawSink;
120+
public fun encryptingSource (Lkotlinx/io/RawSource;)Lkotlinx/io/RawSource;
121+
}
122+
123+
public abstract interface class dev/whyoleg/cryptography/providers/base/operations/CipherFunction {
124+
public abstract fun transform ([BII)[B
125+
public static synthetic fun transform$default (Ldev/whyoleg/cryptography/providers/base/operations/CipherFunction;[BIIILjava/lang/Object;)[B
126+
public abstract fun transformedSink (Lkotlinx/io/RawSink;)Lkotlinx/io/RawSink;
127+
public abstract fun transformedSource (Lkotlinx/io/RawSource;)Lkotlinx/io/RawSource;
128+
}
129+

0 commit comments

Comments
 (0)