BSV v0.1.0-dev.2 BSV.Crypto.ECDSA.PrivateKey View Source
ECDSA Private Key module.
Link to this section Summary
Functions
Converts the given ECDSA private key to an Erlang ECDSA key sequence.
Convert a BSV.Crypto.ECDSA.PrivateKey.t/0
to a BSV.Crypto.ECDSA.PrivateKey.sequence/0
.
Converts the given Erlang ECDSA key sequence to a ECDSA private key.
Returns the public key from the given ECDSA private key.
Link to this section Types
Erlang ECDSA Private Key sequence
ECDSA Private Key
Link to this section Functions
Link to this function
as_sequence(ecdsa_key)
View Sourceas_sequence(BSV.Crypto.ECDSA.PrivateKey.t()) :: BSV.Crypto.ECDSA.PrivateKey.sequence()
Converts the given ECDSA private key to an Erlang ECDSA key sequence.
Convert a BSV.Crypto.ECDSA.PrivateKey.t/0
to a BSV.Crypto.ECDSA.PrivateKey.sequence/0
.
Examples
iex> ecdsa_key = BSV.Crypto.ECDSA.PrivateKey.from_sequence(BSV.Test.ecdsa_key)
...>
...> BSV.Crypto.ECDSA.PrivateKey.as_sequence(ecdsa_key)
...> |> is_tuple
true
Link to this function
from_sequence(ecdsa_key_sequence)
View Sourcefrom_sequence(BSV.Crypto.ECDSA.sequence()) :: BSV.Crypto.ECDSA.PrivateKey.t()
Converts the given Erlang ECDSA key sequence to a ECDSA private key.
Examples
iex> ecdsa_key = BSV.Crypto.ECDSA.PrivateKey.from_sequence(BSV.Test.ecdsa_key)
...> ecdsa_key.__struct__ == BSV.Crypto.ECDSA.PrivateKey
true
Link to this function
get_public_key(ecdsa_key)
View Sourceget_public_key(BSV.Crypto.ECDSA.PrivateKey.t()) :: BSV.Crypto.ECDSA.PublicKey.t()
Returns the public key from the given ECDSA private key.
Examples
iex> public_key = BSV.Crypto.ECDSA.PrivateKey.from_sequence(BSV.Test.ecdsa_key)
...> |> BSV.Crypto.ECDSA.PrivateKey.get_public_key
...> public_key.__struct__ == BSV.Crypto.ECDSA.PublicKey
true