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

Cannot decrypt int64 (long) fields #13

Closed
wdutkiewicz opened this issue Nov 17, 2023 · 3 comments
Closed

Cannot decrypt int64 (long) fields #13

wdutkiewicz opened this issue Nov 17, 2023 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@wdutkiewicz
Copy link

wdutkiewicz commented Nov 17, 2023

Hi, @hpgrahsl

I encountered an error when trying to decrypt fields of type long (INT64). I believe there is a bug in TypeSchemaMapper.java

Map<Type, Supplier<SchemaBuilder>> DEFAULT_MAPPINGS_DECRYPT =
      Map.of(
          Type.BOOLEAN, SchemaBuilder::bool,
          Type.INT8, SchemaBuilder::int8,
          Type.INT16, SchemaBuilder::int16,
          Type.INT32, SchemaBuilder::int32,
          Type.INT64, SchemaBuilder::int16,
          Type.FLOAT32, SchemaBuilder::float32,
          Type.FLOAT64, SchemaBuilder::float64,
          Type.STRING, SchemaBuilder::string,
          Type.BYTES, SchemaBuilder::bytes
      );

INT64 is mapped to int16 - shouldn't it be int64?

@hpgrahsl
Copy link
Owner

Yes, good catch. That's a bug indeed. THX for reporting this.

@hpgrahsl hpgrahsl added the bug Something isn't working label Nov 24, 2023
@hpgrahsl hpgrahsl self-assigned this Nov 24, 2023
@hpgrahsl
Copy link
Owner

Will be addressed in the next (patch) release.

@hpgrahsl
Copy link
Owner

@wdutkiewicz Find the patch release here https://github.com/hpgrahsl/kryptonite-for-kafka/releases/tag/v0.4.2 Give it a try and let me know if this solves the reported issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants