BSV-ex v0.2.5 BSV.Crypto.ECDSA.PublicKey View Source
ECDSA Private Key module.
Link to this section Summary
Functions
Converts the given ECDSA public key struct to an Erlang EC point sequence.
Converts the given public key into a compressed binary
Link to this section Types
Erlang ECDSA Public Key sequence
ECDSA Public Key
Link to this section Functions
Link to this function
as_sequence(public_key)
View Sourceas_sequence(t()) :: BSV.Crypto.ECDSA.Key.sequence()
Converts the given ECDSA public key struct to an Erlang EC point sequence.
Examples
iex> public_key = BSV.Crypto.ECDSA.PrivateKey.from_sequence(BSV.Test.ecdsa_key)
...> |> BSV.Crypto.ECDSA.PrivateKey.get_public_key
...>
...> BSV.Crypto.ECDSA.PublicKey.as_sequence(public_key)
...> |> is_tuple
true
Converts the given public key into a compressed binary
Examples
iex> public_key = BSV.Crypto.ECDSA.PrivateKey.from_sequence(BSV.Test.ecdsa_key)
...> |> BSV.Crypto.ECDSA.PrivateKey.get_public_key
...>
...> BSV.Crypto.ECDSA.PublicKey.compress(public_key)
...> |> byte_size
33