diff options
| author | frosty <frostinator33@airmail.cc> | 2026-10-26 10:21:57 -0400 |
|---|---|---|
| committer | frosty <frostinator33@airmail.cc> | 2026-10-26 10:21:57 -0400 |
| commit | 74aecd8b0986d07b50b7ce310d64e645b8b54e38 (patch) | |
| tree | 560e6434f183eb54cd779936f3a4c9575146a066 /libdino/src/crypto/cipher.vala | |
| parent | 3d7e90d401da02d430a87db0ec7e1db3a6f1a68f (diff) | |
| parent | 4436001bb361ad4f9e4e05819214ecf0ea77c063 (diff) | |
Merge 'upstream/master'
Diffstat (limited to 'libdino/src/crypto/cipher.vala')
| -rw-r--r-- | libdino/src/crypto/cipher.vala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libdino/src/crypto/cipher.vala b/libdino/src/crypto/cipher.vala new file mode 100644 index 00000000..89282144 --- /dev/null +++ b/libdino/src/crypto/cipher.vala @@ -0,0 +1,19 @@ +namespace Dino.Crypto { + +public interface SymmetricCipher { + public abstract void set_key(uint8[] key) throws Error; + public abstract void set_iv(uint8[] iv) throws Error; + public abstract void reset() throws Error; +} + +public interface SymmetricCipherEncryption : SymmetricCipher, Object { + public abstract int encrypt(uint8[] output, uint8[] input) throws Error; + public abstract uint8[] get_tag(size_t taglen) throws Error; +} + +public interface SymmetricCipherDecryption : SymmetricCipher, Object { + public abstract int decrypt(uint8[] output, uint8[] input) throws Error; + public abstract void check_tag(uint8[] tag) throws Error; +} + +} |
