Skip to content

Conversation

@robinlinden
Copy link
Collaborator

This is in preparation of using it in the database types now that that is a thing that's possible.

This is the non-database part of #1291. Switching to using PublicKey in the database requires rules_kotlin changes due to not supporting passing arguments to ksp/kapt processors, and that's a later problem.

value class PublicKey(private val value: String) {
fun bytes() = hexToBytes(value)
fun string() = value
fun fingerprint() = value.take(8)

Check warning

Code scanning / detekt

Report magic numbers. Magic number is a numeric literal that is not defined as a constant and hence it's unclear what the purpose of this number is. It's better to declare such numbers as constants and give them a proper name. By default, -1, 0, 1, and 2 are not considered to be magic numbers. Warning

This expression contains a magic number. Consider defining it to a well named constant.
This is in preparation of using it in the database types now that that
is a thing that's possible.
@robinlinden robinlinden merged commit a9c9d9d into evilcorpltd:master May 11, 2025
10 checks passed
@robinlinden robinlinden deleted the core-pk-move branch May 11, 2025 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant