sha1.slt 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Copyright 1994, Regents of the University of California.
  2. # Copyright 1996-2020 PostgreSQL Global Development Group.
  3. # Copyright Materialize, Inc. and contributors. All rights reserved.
  4. #
  5. # Use of this software is governed by the Business Source License
  6. # included in the LICENSE file at the root of this repository.
  7. #
  8. # As of the Change Date specified in that file, in accordance with
  9. # the Business Source License, use of this software will be governed
  10. # by the Apache License, Version 2.0.
  11. #
  12. # This file is derived from the regression test suite in PostgreSQL.
  13. # The original file was retrieved on December 14, 2020 from:
  14. #
  15. # https://github.com/postgres/postgres/blob/9b584953e7bf91e342af87ef44606acd6206cd1c/contrib/pgcrypto/expected/sha1.out
  16. #
  17. # The original source code is subject to the terms of the PostgreSQL
  18. # license, a copy of which can be found in the LICENSE file at the
  19. # root of this repository
  20. query T
  21. SELECT digest('', 'sha1')::text
  22. ----
  23. \xda39a3ee5e6b4b0d3255bfef95601890afd80709
  24. query T
  25. SELECT digest('a', 'sha1')::text
  26. ----
  27. \x86f7e437faa5a7fce15d1ddcb9eaeaea377667b8
  28. query T
  29. SELECT digest('abc', 'sha1')::text
  30. ----
  31. \xa9993e364706816aba3e25717850c26c9cd0d89d
  32. query T
  33. SELECT digest('message digest', 'sha1')::text
  34. ----
  35. \xc12252ceda8be8994d5fa0290a47231c1d16aae3
  36. query T
  37. SELECT digest('abcdefghijklmnopqrstuvwxyz', 'sha1')::text
  38. ----
  39. \x32d10c7b8cf96570ca04ce37f2a19d84240d3a89
  40. query T
  41. SELECT digest('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789', 'sha1')::text
  42. ----
  43. \x761c457bf73b14d27e9e9265c46f4b4dda11f940
  44. query T
  45. SELECT digest('12345678901234567890123456789012345678901234567890123456789012345678901234567890', 'sha1')::text
  46. ----
  47. \x50abf5706a150990a08b2c5ea40fa0e585554732