|
From: Leyne, S. <Se...@br...> - 2017-07-19 14:44:46
|
> > We need to decide whether the algorithm name can be passed dynamically > > (and thus be presented as "value" in the grammar) or must be > > predefined (via a string literal or maybe token). The latter gives us > > more flexibility regarding the result type. > > This is an interesting idea. > > We can use special syntax (like some others system functions): > > HASH( <value> [WITH <algorithm>] ) Why do we need to extend the current function? Why not create separate, built-in, functions for each hash type with names* that align with the common algorithm name? MD2() ... MD5() SHA0() SHA1() SHA_224() ... SHA512_256() ... SHA3_224() ... SHA3_512() (would save needing to look at documentation to determine the supported algorithms)? Sean * https://en.wikipedia.org/wiki/Comparison_of_cryptographic_hash_functions |