|
From: Vlad K. <hv...@us...> - 2017-07-18 20:35:36
|
18.07.2017 21:55, Adriano dos Santos Fernandes wrote: > Hi! > > We have HASH function that returns a 64 bit integer. The algorithm is > bad and the result too small for a hash. > > I propose to extend the same function with a second parameter with the > algorithm name. > > When only one parameter is passed, things works as now. > > When two parameters are passed, it will return a VARCHAR(64) CHARACTER > SET OCTETS. That's sufficient for a SHA-256, for example. Algorithm name could define result length. If alg name is passed as parameter, we could use maximum known length (of all known algs) at prepare time. Just my 0.02 UAH, Vlad |