Skip to content

sha3: Incorrect type alias for Xof readers? #426

@andrewwhitehead

Description

@andrewwhitehead

In sha3 1.10.5 the Shake256Reader type alias expands to XofReaderCoreWrapper<Shake256Core>, but this produces the following type error when used:

the trait bound `Shake256Core: XofReaderCore` is not satisfied
the following other types implement trait `XofReaderCore`:
  CShake128ReaderCore
  CShake256ReaderCore
  Shake128ReaderCore
  Shake256ReaderCore

In the impl_shake macro this is defined by:

pub type $reader_full = XofReaderCoreWrapper<$name>;

Which I suspect should be:

pub type $reader_full = XofReaderCoreWrapper<$reader>;

As a workaround, I am just redefining the type alias as such:

type Shake256Reader = sha3::digest::core_api::XofReaderCoreWrapper<sha3::Shake256ReaderCore>;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions