rajouter une constante buffer_size
This commit is contained in:
parent
26772729ab
commit
3508a71fb0
|
@ -27,6 +27,11 @@ class ChaCha constructor(val key: ByteArray) {
|
|||
*/
|
||||
private val IV_SIZE = 8
|
||||
|
||||
/**
|
||||
* Taille des buffers utilisés pendant le chiffrement et le déchiffrement en octets
|
||||
*/
|
||||
private val BUFFER_SIZE = 8192
|
||||
|
||||
/**
|
||||
* Génère une clé de chiffrement pour l'algorithme ChaCha20
|
||||
*
|
||||
|
@ -81,8 +86,8 @@ class ChaCha constructor(val key: ByteArray) {
|
|||
val input = ByteArrayInputStream(text)
|
||||
val output = ByteArrayOutputStream()
|
||||
|
||||
val inputBuffer = ByteArray(8192)
|
||||
val outputBuffer = ByteArray(8192)
|
||||
val inputBuffer = ByteArray(BUFFER_SIZE)
|
||||
val outputBuffer = ByteArray(BUFFER_SIZE)
|
||||
|
||||
// instanciation du vecteur d'initialisation
|
||||
val params: ParametersWithIV
|
||||
|
|
Loading…
Reference in a new issue