1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 23:36:37 +02:00

core: add algorithms sha512-224, sha512-256, sha3-*, blake2b-* and blake2s-*` in option sec.crypt.hash_algo (closes #2008)

This commit is contained in:
Sébastien Helleu
2023-09-13 15:10:19 +02:00
parent 684bfd64c6
commit ef99d544fa
24 changed files with 1106 additions and 164 deletions
+16
View File
@@ -269,6 +269,22 @@ TEST(CoreCrypto, GetHashAlgo)
#endif
}
/*
* Tests functions:
* weecrypto_get_cipher
*/
TEST(CoreCrypto, GetCipher)
{
LONGS_EQUAL(GCRY_CIPHER_NONE, weecrypto_get_cipher (NULL));
LONGS_EQUAL(GCRY_CIPHER_NONE, weecrypto_get_cipher (""));
LONGS_EQUAL(GCRY_CIPHER_NONE, weecrypto_get_cipher ("not_a_cipher"));
LONGS_EQUAL(GCRY_CIPHER_AES128, weecrypto_get_cipher ("aes128"));
LONGS_EQUAL(GCRY_CIPHER_AES192, weecrypto_get_cipher ("aes192"));
LONGS_EQUAL(GCRY_CIPHER_AES256, weecrypto_get_cipher ("aes256"));
}
/*
* Tests functions:
* weecrypto_hash