You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -95,10 +92,10 @@ public interface BlockCipherFactory {
95
92
96
93
/**
97
94
* Convenience method, if you are using the javax.crypto API. This is just a wrapper for {@link #encrypt(byte[], byte[], byte[], byte[]...)}.
98
-
*
99
-
* @param ctrKey SIV mode requires two separate keys. You can use one long key, which is splitted in half. See https://tools.ietf.org/html/rfc5297#section-2.2
100
-
* @param macKey SIV mode requires two separate keys. You can use one long key, which is splitted in half. See https://tools.ietf.org/html/rfc5297#section-2.2
101
-
* @param plaintext Your plaintext, which shall be encrypted.
95
+
*
96
+
* @param ctrKey SIV mode requires two separate keys. You can use one long key, which is splitted in half. See https://tools.ietf.org/html/rfc5297#section-2.2
97
+
* @param macKey SIV mode requires two separate keys. You can use one long key, which is splitted in half. See https://tools.ietf.org/html/rfc5297#section-2.2
98
+
* @param plaintext Your plaintext, which shall be encrypted.
102
99
* @param associatedData Optional associated data, which gets authenticated but not encrypted.
103
100
* @return IV + Ciphertext as a concatenated byte array.
104
101
* @throws IllegalArgumentException if keys are invalid or {@link SecretKey#getEncoded()} is not supported.
* Encrypts plaintext using SIV mode. A block cipher defined by the constructor is being used.<br>
122
-
*
123
-
* @param ctrKey SIV mode requires two separate keys. You can use one long key, which is splitted in half. See https://tools.ietf.org/html/rfc5297#section-2.2
124
-
* @param macKey SIV mode requires two separate keys. You can use one long key, which is splitted in half. See https://tools.ietf.org/html/rfc5297#section-2.2
125
-
* @param plaintext Your plaintext, which shall be encrypted.
119
+
*
120
+
* @param ctrKey SIV mode requires two separate keys. You can use one long key, which is splitted in half. See https://tools.ietf.org/html/rfc5297#section-2.2
121
+
* @param macKey SIV mode requires two separate keys. You can use one long key, which is splitted in half. See https://tools.ietf.org/html/rfc5297#section-2.2
122
+
* @param plaintext Your plaintext, which shall be encrypted.
126
123
* @param associatedData Optional associated data, which gets authenticated but not encrypted.
127
124
* @return IV + Ciphertext as a concatenated byte array.
128
125
* @throws IllegalArgumentException if the either of the two keys is of invalid length for the used {@link BlockCipher}.
* Convenience method, if you are using the javax.crypto API. This is just a wrapper for {@link #decrypt(byte[], byte[], byte[], byte[]...)}.
151
-
*
152
-
* @param ctrKey SIV mode requires two separate keys. You can use one long key, which is splitted in half. See https://tools.ietf.org/html/rfc5297#section-2.2
153
-
* @param macKey SIV mode requires two separate keys. You can use one long key, which is splitted in half. See https://tools.ietf.org/html/rfc5297#section-2.2
154
-
* @param ciphertext Your cipehrtext, which shall be decrypted.
148
+
*
149
+
* @param ctrKey SIV mode requires two separate keys. You can use one long key, which is splitted in half. See https://tools.ietf.org/html/rfc5297#section-2.2
150
+
* @param macKey SIV mode requires two separate keys. You can use one long key, which is splitted in half. See https://tools.ietf.org/html/rfc5297#section-2.2
151
+
* @param ciphertext Your cipehrtext, which shall be decrypted.
155
152
* @param associatedData Optional associated data, which needs to be authenticated during decryption.
156
153
* @return Plaintext byte array.
157
-
* @throws IllegalArgumentException If keys are invalid or {@link SecretKey#getEncoded()} is not supported.
154
+
* @throws IllegalArgumentException If keys are invalid or {@link SecretKey#getEncoded()} is not supported.
158
155
* @throws UnauthenticCiphertextException If the authentication failed, e.g. because ciphertext and/or associatedData are corrupted.
159
-
* @throws IllegalBlockSizeException If the provided ciphertext is of invalid length.
156
+
* @throws IllegalBlockSizeException If the provided ciphertext is of invalid length.
* Decrypts ciphertext using SIV mode. A block cipher defined by the constructor is being used.<br>
177
-
*
178
-
* @param ctrKey SIV mode requires two separate keys. You can use one long key, which is splitted in half. See https://tools.ietf.org/html/rfc5297#section-2.2
179
-
* @param macKey SIV mode requires two separate keys. You can use one long key, which is splitted in half. See https://tools.ietf.org/html/rfc5297#section-2.2
180
-
* @param ciphertext Your ciphertext, which shall be encrypted.
174
+
*
175
+
* @param ctrKey SIV mode requires two separate keys. You can use one long key, which is splitted in half. See https://tools.ietf.org/html/rfc5297#section-2.2
176
+
* @param macKey SIV mode requires two separate keys. You can use one long key, which is splitted in half. See https://tools.ietf.org/html/rfc5297#section-2.2
177
+
* @param ciphertext Your ciphertext, which shall be encrypted.
181
178
* @param associatedData Optional associated data, which needs to be authenticated during decryption.
182
179
* @return Plaintext byte array.
183
-
* @throws IllegalArgumentException If the either of the two keys is of invalid length for the used {@link BlockCipher}.
180
+
* @throws IllegalArgumentException If the either of the two keys is of invalid length for the used {@link BlockCipher}.
184
181
* @throws UnauthenticCiphertextException If the authentication failed, e.g. because ciphertext and/or associatedData are corrupted.
185
-
* @throws IllegalBlockSizeException If the provided ciphertext is of invalid length.
182
+
* @throws IllegalBlockSizeException If the provided ciphertext is of invalid length.
0 commit comments