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

[refactor] #4339: refactor iroha_crypto, update API #4341

Merged
merged 10 commits into from
Mar 13, 2024

Commits on Mar 13, 2024

  1. [refactor] hyperledger-iroha#4339: refactor iroha_crypto, update API

    Signed-off-by: Dmitry Balashov <43530070+0x009922@users.noreply.github.com>
    0x009922 committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    599102a View commit details
    Browse the repository at this point in the history
  2. [chore]: clean

    Signed-off-by: Dmitry Balashov <43530070+0x009922@users.noreply.github.com>
    0x009922 committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    2d74a74 View commit details
    Browse the repository at this point in the history
  3. [refactor]: use from_bytes/to_bytes

    Signed-off-by: Dmitry Balashov <43530070+0x009922@users.noreply.github.com>
    0x009922 committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    b990384 View commit details
    Browse the repository at this point in the history
  4. [refactor]: use try_from and into serde container attrs

    Signed-off-by: Dmitry Balashov <43530070+0x009922@users.noreply.github.com>
    0x009922 committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    c3f8ff4 View commit details
    Browse the repository at this point in the history
  5. [refactor]: serialize keys' payloads in uppercase hex

    There is also `iroha_swarm`, which still uses lowercase
    
    Signed-off-by: Dmitry Balashov <43530070+0x009922@users.noreply.github.com>
    0x009922 committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    25d64f3 View commit details
    Browse the repository at this point in the history
  6. [fix]: also use uppercase for Signature's payload

    Signed-off-by: Dmitry Balashov <43530070+0x009922@users.noreply.github.com>
    0x009922 committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    1708b01 View commit details
    Browse the repository at this point in the history
  7. [refactor]: stronger types in KeyGenOption, renames and fixes

    Signed-off-by: Dmitry Balashov <43530070+0x009922@users.noreply.github.com>
    0x009922 committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    14de07b View commit details
    Browse the repository at this point in the history
  8. [refactor]: revert rename

    Signed-off-by: Dmitry Balashov <43530070+0x009922@users.noreply.github.com>
    0x009922 committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    03fb5a8 View commit details
    Browse the repository at this point in the history
  9. [refactor]: snip KeyGenConfig entirely

    - Rename `KeyPair::generate` to `KeyPair::random`
    - Add `KeyPair::random_with_algorithm`
    - Add `KeyPair::from_seed`
    - Add `impl From<PrivateKey> for KeyPair`
    
    Also:
    
    - Rename `KeyPair::new` to `KeyPair::from_raw_parts`
      for consistency
    
    Signed-off-by: Dmitry Balashov <43530070+0x009922@users.noreply.github.com>
    0x009922 committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    e466a6a View commit details
    Browse the repository at this point in the history
  10. [refactor]: restruct KeyPair methods

    - revert `from_raw_parts` to `new`
    - rename `into_raw_parts` to `into_parts`
    - remove `impl From<KeyPair> to (K, K)`
    
    Signed-off-by: Dmitry Balashov <43530070+0x009922@users.noreply.github.com>
    0x009922 committed Mar 13, 2024
    Configuration menu
    Copy the full SHA
    0d7c78a View commit details
    Browse the repository at this point in the history