Modules

hex_api hex_api_key hex_api_package hex_api_package_owner hex_api_release hex_api_user hex_core hex_http hex_http_httpc hex_pb_names hex_pb_package hex_pb_signed hex_pb_versions hex_registry hex_repo hex_tarball safe_erl_term

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/1 Decode message created with encode_names/1.
decode_package/1 Decode message created with encode_package/1.
decode_signed/1 Decode message created with sign_protobuf/2 without verification.
decode_versions/1 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::binary(), PublicKey::public_key()) -> {ok, binary()} | {error, term()}

Decode message created with sign_protobuf/2 and verify it against public key.

decode_names/1

decode_names(Payload) -> any()

Decode message created with encode_names/1.

decode_package/1

decode_package(Payload) -> 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/1

decode_versions(Payload) -> 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.