Downloads

Featured downloads

Recently published downloads

SHA-1 Message Digest UDF

Version: 1.0 - Created: 12 Jun 2008

This UDF implements the Secure Hash Algorithm, SHA-1, for computing a condensed representation of a message. When a message of any length < 264 bits is input, the SHA-1 produces a 160-bit output called a message digest (FIPS 180-1 / RFC 3174). This distribution contains full source code, a test suite, scripts, and documentation. README SHA-1 UDF package for Teradata Version 1.1 (2008-05-08) Copyright (c) 2008 Teradata Corporation. All Rights Reserved. This package is provided "as is". No warranty is provided. 1. Summary This package includes a UDF which generates SHA-1 message digest. For SHA-1 itself, refer RFC1321[1]. 2. Syntax hash_sha1(varchar) This function takes one char/varchar argument of arbitary length and always returns 160-bit hash value as hexadecimal char(40) format. It does not accept NULL value. 3. Installation 1 unpack the archive and go to src directory 2 start bteq and login to teradata 3 .run file = hash_sha1.btq 4 if you would like to validate hash value generated by the UDF, run sha1test_cre.sql, sha1test_ins.sql and sha1test_chck.sql in the test directory. 4. History Removed malloc() function which may cause memory problem in UDF. Fixed compilation issues on Windows platform. 5. Caveat You should not use these function to encrypt password without 'salt'. 6. Author KURODA Akira <akira.kuroda@teradata.com> Teradata Japan A. Rererences [1] FIPS PUB 180-1, SECURE HASH STANDARD http://www.itl.nist.gov/fipspubs/fip180-1.htm B. Example hash_sha1('abc') -> A9993E364706816ABA3E25717850C26C9CD0D89D hash_sha1('abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq') -> 84983E441C3BD26EBAAE4AA1F95129E5E54670F1

Great Circle Distance Calculation UDF

Version: 1.0 - Created: 12 Jun 2008

This UDF implements the great circle distance algorithm to determine the distance in miles between two points expressed in longitude and latitude. This distribution contains full source code, REPLACE FUNCTION SQL, a test suite and documentation.

MD5 Message Digest UDF

Version: 1.0 - Created: 12 Jun 2008

This UDF implements the MD5 message-digest algorithm. The algorithm takes as input a message of arbitrary length and produces as output a 128-bit "fingerprint" or "message digest" of the input (RFC1321). This distribution contains full source code, a test suite, scripts, and documentation. README MD5 UDF package for Teradata Version 2.0 (2008-05-08) 1. Summary This package includes a UDF that generates MD5 message digest. For MD5 itself, refer RFC1321[1]. 2. Syntax hash_md5(varchar) This function takes one char/varchar argument of arbitary length and always returns 128-bit hash value as hexadecimal char(32) format. It does not accept NULL value. The name of the UDF is changed from there is an incompatibility against previous release. (see 4. History) 3. Installation 1 unpack the archive and go to src directory 2 start bteq and login to teradata 3 .run file = hash_md5.btq 4 if you would like to validate hash value generated by the UDF, run md5test_cre.sql, md5test_ins.sql and md5test_chck.sql in the test directory You can edit md5.h to customize hash generation. UDF_MD5_UPPERCASE: if set to 1 (default), generate MD5 result in upper case UDF_MD5_COMPAT: if set to 1 (not default), generate same result as previous release (see 4. History) 4. History Fixed MD5 algorithm that generates wrong result when the input length is 54 + 64*N bytes (N>= 0). Removed malloc() function which may cause memory problem in UDF. Fixed compilation issues on Windows platform. 5. Caveat You should not use these function to encrypt password without 'salt'. 6. Author KURODA Akira <akira.kuroda@teradata.com> Teradata Japan A. Rererences [1] Rivest, R., "The MD5 Message-Digest Algorithm", RFC 1321, April 1992. B. Example hash_md5('') -> d41d8cd98f00b204e9800998ecf8427e hash_md5('a') -> 0cc175b9c0f1b6a831c399e269772661 hash_md5('abc') -> 900150983cd24fb0d6963f7d28e17f72 hash_md5('message digest') -> f96b697d7cb7938d525a2f31aaf161d0 hash_md5('message digest') -> f96b697d7cb7938d525a2f31aaf161d0 hash_md5('abcdefghijklmnopqrstuvwxyz') -> c3fcd3d76192e4007dfb496cca67e13b hash_md5('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789') -> d174ab98d277d9f5a5611c2c9f419d9f hash_md5('123456789012345678901234567890123456789012345678901234567890123456 78901234567890') -> 57edf4a22be3c955ac49da2e2107b67a

UDF Packaging for Teradata 12.0

Version: 1.0 - Created: 02 Mar 2008

The self extractable file includes the lobload application to load UDF's, SP's etc. into Teradata as part of installation.

Sample UDFs for String Searching

Version: 1.0 - Created: 11 Sep 2007

Eight UDFs that search VARCHAR and CLOB string sources to see if they contain VARCHAR or CLOB string sets. Four of the UDFs are overloaded (named the same) to return the result in the form of VARCHAR or CLOB string while the other four UDFs are overloaded to return an INTEGER index into the string source if a match is found.