protected static function calculateMAC(string $message, string $authKey, SymmetricConfig $config) : string
{
if ($config->MAC_ALGO === 'BLAKE2b') {
return \Sodium\crypto_generichash($message, $authKey, $config->MAC_SIZE);
}
throw new InvalidMessage('Invalid Halite version');
}