Reputation: 21
In Mysql,
Sha1
function returns 40 byte length output for any input length.
For Example,
select sha1('ABCD');
output:fb2f85c88567f3c8ce9b799c7c54642d0c7b41f6
Similar to Mysql,
Please help me finding out what function is equivalent of sha1
in db2 iseries/AS400?
Upvotes: 2
Views: 1047
Reputation: 4542
While DB2 for i does not currently have a built-in SHA-1 function, you could perhaps write your own user defined function, using the Cryptographic Services APIs and the Calculate Hash API
Upvotes: 0
Reputation: 11473
On DB2 for i, you can use ENCRYPT_AES
, ENCRYPT_RC2
, or ENCRYPT_TDES
, but there is no SHA1
function. You can find documentation here:
https://www.ibm.com/support/knowledgecenter/ssw_ibm_i_73/db2/rbafzscaencryptaes.htm
Upvotes: 1