Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom Hardware (MAC) Addresses #41

Closed
theckman opened this issue Jul 28, 2018 · 0 comments
Closed

Add support for custom Hardware (MAC) Addresses #41

theckman opened this issue Jul 28, 2018 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@theckman
Copy link
Member

Some consumers of this package may want to generate V1 UUIDs without exposing their physical device's hardware address to consumers of that UUID. We should look at exposing this functionality in some capacity for consumers.

See the issue on the original repo for more details (satori/go.uuid#64).

/cc @alessandrozucca

It seems like exposing the generator itself, and allowing people to provide their own HWAddr function should support most of what's needed here.

theckman added a commit that referenced this issue Jul 28, 2018
This change exposes the reference UUID generator in the package, so that
consumers can create a new instance and make use of it. This is being done so
that consumers can provide their own Hardware Address generation function, in
case they want to randomize the MAC address as to not expose it.

This works by now exposing the `rfc4122Generator` type as `Gen`, and adding
constructor functions that scaffold the generator appropriately. The tests were
also enhanced to confirm that the `HWAddrFunc` we provide is indeed being
invoked.

Fixes #41

Signed-off-by: Tim Heckman <t@heckman.io>
@theckman theckman added this to the 3.0.0 milestone Jul 28, 2018
@niaow niaow added the enhancement New feature or request label Jul 29, 2018
theckman added a commit that referenced this issue Jul 29, 2018
This change exposes the reference UUID generator in the package, so that
consumers can create a new instance and make use of it. This is being done so
that consumers can provide their own Hardware Address generation function, in
case they want to randomize the MAC address as to not expose it.

This works by now exposing the `rfc4122Generator` type as `Gen`, and adding
constructor functions that scaffold the generator appropriately. The tests were
also enhanced to confirm that the `HWAddrFunc` we provide is indeed being
invoked.

Fixes #41

Signed-off-by: Tim Heckman <t@heckman.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants