Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Follow standard crypto interface in the crypto package #74

Open
shuse2 opened this issue Feb 28, 2023 · 1 comment
Open

Follow standard crypto interface in the crypto package #74

shuse2 opened this issue Feb 28, 2023 · 1 comment

Comments

@shuse2
Copy link
Collaborator

shuse2 commented Feb 28, 2023

Description

Currently, crypto package GetKeys do not follow standard crypto library interface. For example, PrivateKey is []byte but it implements Public and Equal. we should keep the standard interface as much as possible

  • crypto should have PublicKey PrivateKey type instead of []byte
  • Refactor GetKeys to accept []byte instead of string
  • Add Verify and Sign
  • Refactor util functions (Hash, hexToString, hexToBytes, GetAddress etc) to be in different file (utils.go)

Acceptance Criteria

  • Update comments and examples
  • All function should be covered by unit test
@shuse2
Copy link
Collaborator Author

shuse2 commented Feb 28, 2023

Related discussion: #73 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant