BSV-ex v0.3.0 BSV.Crypto.RSA.PublicKey View Source
RSA Public Key module.
Link to this section Summary
Functions
Converts the given RSA private key struct to an Erlang private key raw list.
Converts the given RSA public key struct to an Erlang public key sequence.=
Converts the given Erlang public key raw list to a RSA public key struct.
Converts the given Erlang public key sequence to a RSA public key struct.
Link to this section Types
Erlang RSA Public Key raw binary list
Erlang RSA Public Key sequence
RSA Public Key
Link to this section Functions
Link to this function
as_raw(private_key)
View Sourceas_raw(BSV.Crypto.RSA.PrivateKey.t()) :: BSV.Crypto.RSA.PrivateKey.raw_key()
Converts the given RSA private key struct to an Erlang private key raw list.
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
Converts the given Erlang public key raw list to a RSA public key struct.
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)
...> public_key.__struct__ == BSV.Crypto.RSA.PublicKey
true