This page covers the various cryptographic functions supported by Rockset.

Note that the functions in this page take `bytes`

arguments and return
`bytes`

values. You may pass in a `string`

as argument (it will be encoded as
UTF-8), and you may convert the returned `bytes`

to `string`

using, for
instance, `TO_HEX()`

.

`HASH(x, digest)`

Computes the hash of the `bytes`

value `x`

using `digest`

, where `digest`

is the string name of any digest method supported by OpenSSL.

`MD5(x)`

Computes the MD5 hash of the `bytes`

value `x`

.

`SHA1(x)`

Computes the SHA1 hash of the `bytes`

value `x`

.

`SHA256(x)`

Computes the SHA256 hash of the `bytes`

value `x`

.

`SHA512(x)`

Computes the SHA512 hash of the `bytes`

value `x`

.

`HMAC_MD5(x, key)`

Computes the MD5 HMAC of the `bytes`

value `x`

using `key`

as the key.

`HMAC_SHA1(x, key)`

Computes the SHA1 HMAC of the `bytes`

value `x`

using `key`

as the key.

`HMAC_SHA256(x, key)`

Computes the SHA256 HMAC of the `bytes`

value `x`

using `key`

as the key.

`HMAC_SHA512(x, key)`

Computes the SHA512 HMAC of the `bytes`

value `x`

using `key`

as the key.

`HMAC(x, key, digest)`

Computes the HMAC of the `bytes`

value `x`

using `key`

as the key
and `digest`

as the digest method, where `digest`

is the string name of any
digest method supported by OpenSSL.