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