Yandex.Cloud
  • Services
  • Why Yandex.Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Yandex Database
  • Getting started
    • Overview
    • Create databases
    • Examples of YQL queries
    • Examples of operations in the YDB CLI
    • Launch a test app
    • Document API
    • Developing in NodeJS through the Document API
  • Step-by-step instructions
    • Database management
    • How to connect to a database
    • Table management
    • Reading and writing data
    • Working with secondary indexes
  • Working with the SDK
  • Concepts
    • Overview
    • Data model and schema
    • Serverless and Dedicated operation modes
    • Data types
    • Transactions
    • Secondary indexes
    • Time to Live (TTL)
    • Terms and definitions
    • Quotas and limits
  • Access management
  • Pricing policy
    • Overview
    • Serverless mode
    • Dedicated mode
  • Recommendations
    • Schema design
    • Partitioning tables
    • Secondary indexes
    • Paginated output
    • Loading large data volumes
    • Using timeouts
  • YDB API and API reference
    • Database limits
    • Handling errors in the API
  • Amazon DynamoDB-compatible HTTP API
    • API reference
      • All methods
      • Actions
        • BatchGetItem
        • BatchWriteItem
        • CreateTable
        • DeleteItem
        • DeleteTable
        • DescribeTable
        • GetItem
        • ListTables
        • PutItem
        • Query
        • Scan
        • TransactGetItems
        • TransactWriteItems
        • UpdateItem
      • Common errors
  • YQL reference guide
    • Overview
    • Data types
      • Simple
      • Optional
      • Containers
      • Special
    • Syntax
      • Unsupported statements
      • For text representation of data types
      • Expressions
      • CREATE TABLE
      • DROP TABLE
      • INSERT INTO
      • UPSERT INTO
      • REPLACE INTO
      • UPDATE
      • DELETE
      • SELECT
      • GROUP BY
      • JOIN
      • FLATTEN
      • ACTION
      • DISCARD
      • PRAGMA
      • DECLARE
      • OVER, PARTITION BY, and WINDOW
    • Built-in functions
      • Basic
      • Aggregate
      • Window
      • For lists
      • For dictionaries
      • For JSON
      • For structures
      • For types
    • Preset user-defined functions
      • HyperScan
      • Pcre
      • Pire
      • Re2
      • String
      • Unicode
      • Datetime
      • Url
      • Ip
      • Digest
      • Math
      • Histogram
    • For text representation of data types
  • YQL tutorial
    • Overview
    • Creating a table
    • Adding data to a table
    • Selecting data from all columns
    • Selecting data from specific columns
    • Sorting and filtering
    • Data aggregation
    • Additional selection criteria
    • Joining tables by JOIN
    • Data insert and update by REPLACE
    • Data insert and update by UPSERT
    • Data insert by INSERT
    • Data update by UPDATE
    • Deleting data
    • Adding and deleting columns
    • Deleting a table
  • Maintenance
    • Backups
  • Diagnostics
    • System views
  • Questions and answers
    • General questions
    • Errors
    • YQL
    • All questions on the same page
  • Public materials
  1. YQL reference guide
  2. Preset user-defined functions
  3. Digest

Digest UDF

    A set of commonly used hash functions.

    List of functions

    • Digest::Crc32c(String{Flags::AutoMap}) -> Uint32

    • Digest::Fnv32(String{Flags::AutoMap}) -> Uint32

    • Digest::Fnv64(String{Flags::AutoMap}) -> Uint64

    • Digest::MurMurHash(String{Flags:AutoMap}) -> Uint64

    • Digest::CityHash(String{Flags:AutoMap}) -> Uint64

    • Digest::CityHash128(String{Flags:AutoMap}) -> Tuple<Uint64,Uint64>

    • Digest::NumericHash(Uint64{Flags:AutoMap}) -> Uint64

    • Digest::Md5Hex(String{Flags:AutoMap}) -> String

    • Digest::Md5Raw(String{Flags:AutoMap}) -> String

    • Digest::Md5HalfMix(String{Flags:AutoMap}) -> Uint64

      A variant of MD5 coarsening known as yabs_md5.

    • Digest::Argon2(String{Flags:AutoMap},String{Flags:AutoMap}) -> String

      The function takes a hashed data array as its first argument.
      The function takes a salt (a hash function input modifier) as the second argument.

    • Digest::Blake2B(String{Flags:AutoMap}) -> String

    • Digest::SipHash(Uint64,Uint64,String{Flags:AutoMap}) -> Uint64

    • Digest::HighwayHash(Uint64,Uint64,Uint64,Uint64,String{Flags:AutoMap}) -> Uint64

    • Digest::FarmHashFingerprint32(String{Flags:AutoMap}) -> Uint32

    • Digest::FarmHashFingerprint64(String{Flags:AutoMap}) -> Uint64

    • Digest::FarmHashFingerprint128(String{Flags:AutoMap}) -> Tuple<Uint64,Uint64>

    • Digest::SuperFastHash(String{Flags:AutoMap}) -> Uint32

    • Digest::Sha1(String{Flags:AutoMap}) -> String

    • Digest::Sha256(String{Flags:AutoMap}) -> String

    • Digest::IntHash64(Uint64{Flags:AutoMap}) -> Uint64

    Examples

    SELECT Digest::Md5Hex("YQL");  -- "1a0c1b56e9d617688ee345da4030da3c"
    SELECT Digest::NumericHash(123456789); -- 1734215268924325803
    
    Language
    Careers
    Privacy policy
    Terms of use
    © 2021 Yandex.Cloud LLC