Skip to content

Implement From / TryFrom for PrivateKey types (ssh-key) #361

@tcyrus

Description

@tcyrus

Implement the following traits:

  • TryFrom<Mpint> for DsaPrivateKey
  • From<Vec<u8>> for OpaquePrivateKeyBytes
  • From<[u8; SIZE]> for EcdsaPrivateKey<SIZE>

The only way to create these structs as of now is by using the Decode trait from ssh-encoding (as of v0.6.7). This trait isn't exported by ssh-keys, so it creates an extra direct dependency. I'm happy to make a PR to add this to v0.7.0-pre.1, but I would like this back-ported to v0.6.x if possible.

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