Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(mssql): add md2 and md4 hashbytes algos #10537

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

IndexSeek
Copy link
Member

Description of changes

Adds non-auto computed documentation example for hashbytes.

Also adds support for MD2 and MD4 hashing algorithms for Microsoft SQL Server's HASHBYTES function.

Technically, quoting from the docs:

Beginning with SQL Server 2016 (13.x), all algorithms other than SHA2_256, and SHA2_512 are deprecated.

Not sure if it's worth including this portion of the change or not.

In [2]: ibis.options.interactive = True

In [3]: str_lit = ibis.literal("Hello, world!")

In [4]: str_lit.hashbytes("md2")
Out[4]: 
┌──────┐
│ None │
└──────┘

In [5]: str_lit.hashbytes("md4")
Out[5]: 
┌───────────────────────────────────────────────────────┐
│ b'\n\xbe\x9e\xe1\xf3v\xca\xa1\xbc\xec\xad\x90B\xf1ns' │
└───────────────────────────────────────────────────────┘

@github-actions github-actions bot added the sql Backends that generate SQL label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sql Backends that generate SQL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant