Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

crypto: accept ed25519 priv key as a value type #234

Closed

Commits on Jan 22, 2022

  1. crypto: accept ed25519 priv key as a value type

    Since underlying type is []byte, the ed25519 key is generally passed as a value, not a pointer.
    
    In particular, nowhere in std crypto package it is, nor any common parsing functions returns it this way.
    The test itself shows the issue: whereas all other keys are passed as they are got from their respective generators,
    ed25519 needs additional pointer mapping.  Also the behaviour is inconsistent, since in function PubKeyToStdKey in the case for Ed25519 a value to underlying []byte is returned, not a pointer.
    areknoster committed Jan 22, 2022
    Configuration menu
    Copy the full SHA
    b557fdf View commit details
    Browse the repository at this point in the history