Cryptographic

MD5

MD5(string_expr)

Computes MD5 hash value of string_expr.

output type:STRING

Example:

1
dual | select(MD5('SpectX'));
md5
3ab8eea866f50ad0e62659e0550ca3ac

SHA

SHA1(string_expr)

Computes SHA1 hash value of string.

output type:STRING

Example:

1
dual | select(SHA1('SpectX'));
sha1
52bf60ee2e00603e9db81b2e2f594b3f52d9431a

BCRYPT

BCRYPT(passwd_str, hash)

Returns true when plaintext password passwd_str matches previously computed bcrypt hash hash.

output type:BOOLEAN

Example:

1
2
3
dual
| select(
   BCRYPT('mysecret', '$2a$08$LTvRV2427XV.i6.7pB3GROGHqA9P9h2Lox2/1Ed9rEdBtiBsBlzGu'));
bcrypt
true

BCRYPTSALT(hash_str)

SALT(hash_str)

Extracts and returns salt from hash_str bcrypt hash value in base16 encoding.

output type:STRING

Example:

1
2
dual
| select(BCRYPTSALT('$2a$08$LTvRV2427XV.i6.7pB3GROGHqA9P9h2Lox2/1Ed9rEdBtiBsBlzGu'));
bcryptsalt
355c535f8eb8f595c093c03dac3e484d

ROT13(string_expr)

Replaces every letter in argument string with the 13’th letter after it, in the alphabet. https://en.wikipedia.org/wiki/ROT13

output type:STRING

Example:

1
dual | select(ROT13('Why did the chicken cross the road?'));
rot13
Jul qvq gur puvpxra pebff gur ebnq?