The maintained version now lives at Installation Step-by-Step, part of scyto/homelab-docs.
Questions or troubleshooting? Continue the conversation here — a Q&A discussion where replies thread properly, answers can be marked, and everything is searchable. The 27 comments below stay exactly where they are as an archive.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const val AAD_LENGTH = 16 | |
| const val TAG_LENGTH = 16 | |
| class EncryptionOutput(val iv: ByteArray, | |
| val aad: ByteArray, | |
| val tag: ByteArray, | |
| val ciphertext: ByteArray) | |
| fun encrypt(key: SecretKey, message: ByteArray): EncryptionOutput { | |
| val cipher = Cipher.getInstance("AES/GCM/NoPadding") |