h2database / h2database/h2database
HEXTORAW and RAWTOHEX issues
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.6k
- Forks
- 1.3k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 9
Description
Hi,
I'm having an issue testing 2.0.206 with the following query:
select
encrypt('AES', '00', stringtoutf8('3fabb4de8f1ee2e97d7793bab2db1116')),
cast(hextoraw(rawtohex(encrypt('AES', '00', stringtoutf8('3fabb4de8f1ee2e97d7793bab2db1116')))) as raw)
I expect the same byte arrays as result, but instead I receive different ones. I'm trying to find a way to make use of encrypt/decrypt as the return types of these functions changed to bytes and I need functions for storing into a varchar column.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the query from the issue against H2 2.0.206 and compare the byte-array results from ENCRYPT, RAWTOHEX, and HEXTORAW. Read the implementations and tests for these functions to determine whether the conversion is expected to preserve bytes. Done means the round trip produces the same bytes and supports the stated varchar-storage use case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100