exth_crypto v0.1.6 ExthCrypto.Key

Simple functions to interact with keys.

Link to this section Summary

Functions

Converts a key from der to raw format

Converts a key from raw to der format

Link to this section Types

Link to this type key_pair()
key_pair() :: {public_key(), private_key()}
Link to this type private_key()
private_key() :: binary()
Link to this type private_key_der()
private_key_der() :: binary()
Link to this type public_key()
public_key() :: binary()
Link to this type public_key_der()
public_key_der() :: binary()
Link to this type symmetric_key()
symmetric_key() :: binary()

Link to this section Functions

Link to this function der_to_raw(public_key_der)
der_to_raw(public_key_der()) :: public_key()

Converts a key from der to raw format.

Examples

iex> ExthCrypto.Key.der_to_raw(<<0x04, 0x01>>)
<<0x01>>
Link to this function raw_to_der(public_key)
raw_to_der(public_key()) :: public_key_der()

Converts a key from raw to der format.

Examples

iex> ExthCrypto.Key.der_to_raw(<<0x04, 0x01>>)
<<0x01>>