BSV v0.1.0-dev.1 BSV.Crypto.RSA.PrivateKey View Source
RSA Private Key module.
Link to this section Summary
Functions
Converts the given RSA private key struct to an Erlang private key sequence.
Converts the given Erlang private key sequence to a RSA private key struct.
Returns the public key from the given RSA private key.
Link to this section Types
Erlang RSA Private Key sequence
RSA Private Key
Link to this section Functions
Link to this function
as_sequence(private_key)
View Sourceas_sequence(BSV.Crypto.RSA.PrivateKey.t()) :: BSV.Crypto.RSA.PrivateKey.sequence()
Converts the given RSA private key struct to an Erlang private key sequence.
Examples
iex> private_key = BSV.Crypto.RSA.PrivateKey.from_sequence(BSV.Test.rsa_key)
...>
...> BSV.Crypto.RSA.PrivateKey.as_sequence(private_key)
...> |> is_tuple
true
Link to this function
from_sequence(rsa_key_sequence)
View Sourcefrom_sequence(BSV.Crypto.RSA.PrivateKey.sequence()) :: BSV.Crypto.RSA.PrivateKey.t()
Converts the given Erlang private key sequence to a RSA private key struct.
Examples
iex> private_key = BSV.Crypto.RSA.PrivateKey.from_sequence(BSV.Test.rsa_key)
...> (%BSV.Crypto.RSA.PrivateKey{} = private_key) == private_key
true
Link to this function
get_public_key(private_key)
View Sourceget_public_key(BSV.Crypto.RSA.PrivateKey.t()) :: BSV.Crypto.RSA.PublicKey.t()
Returns the public key from the given RSA private key.
Examples
iex> public_key = BSV.Crypto.RSA.PrivateKey.from_sequence(BSV.Test.rsa_key)
...> |> BSV.Crypto.RSA.PrivateKey.get_public_key
...> (%BSV.Crypto.RSA.PublicKey{} = public_key) == public_key
true