Module hex_registry
Data Types
private_key()
private_key() = public_key:rsa_private_key() | binary()
public_key()
public_key() = public_key:rsa_public_key() | binary()
Function Index
decode_and_verify_signed/2 | Decode message created with sign_protobuf/2 and verify it against public key. |
decode_names/2 | Decode message created with encode_names/1. |
decode_package/3 | Decode message created with encode_package/1. |
decode_signed/1 | Decode message created with sign_protobuf/2 without verification. |
decode_versions/2 | Decode message created with encode_versions/1. |
encode_names/1 | Encode Names message. |
encode_package/1 | Encode Package message. |
encode_versions/1 | Encode Versions message. |
sign/2 | Signs binary with given private key. |
sign_protobuf/2 | Encode Signed message. |
verify/3 | Verifies binary against signature and a public key. |
Function Details
decode_and_verify_signed/2
decode_and_verify_signed(Signed::map(), PublicKey::public_key()) -> {ok, binary()} | {error, term()}
Decode message created with sign_protobuf/2 and verify it against public key.
decode_names/2
decode_names(Payload, Repository) -> any()
Decode message created with encode_names/1.
decode_package/3
decode_package(Payload, Repository, Package) -> any()
Decode message created with encode_package/1.
decode_signed/1
decode_signed(Signed) -> any()
Decode message created with sign_protobuf/2 without verification.
decode_versions/2
decode_versions(Payload, Repository) -> any()
Decode message created with encode_versions/1.
encode_names/1
encode_names(Names) -> any()
Encode Names message.
encode_package/1
encode_package(Package) -> any()
Encode Package message.
encode_versions/1
encode_versions(Versions) -> any()
Encode Versions message.
sign/2
sign(Binary::binary(), PrivateKey::private_key()) -> binary()
Signs binary with given private key.
sign_protobuf/2
sign_protobuf(Payload, PrivateKey) -> any()
Encode Signed message.
verify/3
verify(Binary::binary(), Signature::binary(), PublicKey::public_key()) -> boolean() | {error, term()}
Verifies binary against signature and a public key.