Skip to content

Example in ReadMe.md is not update to date #273

@brmmm3

Description

@brmmm3

In older versions of rsa trait the implementation like in the ReadMe example worked. But with the newer version it doesn't compile with the following errors:

add `dyn` keyword before this trait
   |
16 |     let dec_data = priv_key.decrypt(<dyn PaddingScheme>::new_pkcs1v15_encrypt(), &enc_data).expect("failed to decrypt");

and

error[E0599]: no function or associated item named `new_pkcs1v15_encrypt` found for trait object `dyn PaddingScheme` in the current scope
  --> tests/pkcs1v15.rs:16:52

Please update the example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions