diff options
author | SoniEx2 <endermoneymod@gmail.com> | 2021-05-27 20:39:07 -0300 |
---|---|---|
committer | SoniEx2 <endermoneymod@gmail.com> | 2021-05-27 20:39:07 -0300 |
commit | 5571d277b93b62c73568b78c652c85b2e8e95183 (patch) | |
tree | 0d97d65058e31ccdeab4006384442a8e378d5f06 /plugins/fishlim/fish.h | |
parent | f58165fd33919951e2ca594c6f19a785420fc4f9 (diff) | |
parent | 7f8b0a19cff46f7d27451fb9942eea5018f0c5b5 (diff) |
Merge upstream changes
Diffstat (limited to 'plugins/fishlim/fish.h')
-rw-r--r-- | plugins/fishlim/fish.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/plugins/fishlim/fish.h b/plugins/fishlim/fish.h index 238f52e7..6a2e911c 100644 --- a/plugins/fishlim/fish.h +++ b/plugins/fishlim/fish.h @@ -1,6 +1,7 @@ /* Copyright (c) 2010 Samuel Lidén Borell <samuel@kodafritt.se> + Copyright (c) 2019-2020 <bakasura@protonmail.ch> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -29,10 +30,19 @@ #include <glib.h> -char *fish_encrypt(const char *key, size_t keylen, const char *message); -char *fish_decrypt(const char *key, size_t keylen, const char *data); -char *fish_encrypt_for_nick(const char *nick, const char *data); -char *fish_decrypt_from_nick(const char *nick, const char *data); +enum fish_mode { + FISH_ECB_MODE = 0x1, + FISH_CBC_MODE = 0x2 +}; + +char *fish_base64_encode(const char *message, size_t message_len); +char *fish_base64_decode(const char *message, size_t *final_len); +char *fish_encrypt(const char *key, size_t keylen, const char *message, size_t message_len, enum fish_mode mode); +char *fish_decrypt(const char *key, size_t keylen, const char *data, enum fish_mode mode, size_t *final_len); +char *fish_decrypt_str(const char *key, size_t keylen, const char *data, enum fish_mode mode); +gboolean fish_nick_has_key(const char *nick); +GSList *fish_encrypt_for_nick(const char *nick, const char *data, enum fish_mode *omode, size_t command_len); +char *fish_decrypt_from_nick(const char *nick, const char *data, enum fish_mode *omode); #endif |