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

Added support for kupyna512 hash #597

Closed
wants to merge 7 commits into from
Closed

Added support for kupyna512 hash #597

wants to merge 7 commits into from

Conversation

AnarchistHoneybun
Copy link

No description provided.

Copy link
Member

@newpavlov newpavlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please migrate this code to the digest traits (see other crates in this repository for examples). The final crate should not contain any heap allocations and should be no_std-compatible (i.e. you neeed to add #![no_std] to lib.rs).

#[test]
fn test_add_constant_xor() {
let input = [
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use the hex-literal crate for such constants (add it to dev-dependencies).

}

fn matrix_to_block(matrix: Matrix) -> Vec<u8> {
let mut block = vec![0u8; ROWS * COLS];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heap allocation is not necessary here. You can use byte array instead.

@AnarchistHoneybun AnarchistHoneybun closed this by deleting the head repository Jun 29, 2024
@newpavlov newpavlov mentioned this pull request Jul 8, 2024
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.

2 participants