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 AutoClosable interface to MutableBytes to use with try-with-resource #31

Closed
patrickfav opened this issue Jan 12, 2019 · 1 comment
Closed
Assignees
Milestone

Comments

@patrickfav
Copy link
Owner

The idea is to use it with self-wiping properties in security envirnoment, like:

try (MutableBytes b = Bytes.wrap(new byte[16]).mutable()) {
        assertArrayEquals(new byte[16], b.array());
        SecretKey s = new SecretKeySpec(b.array(), "AES");

}

The close logic should then invoke secureWipe()

@patrickfav patrickfav added this to the v1.0.0 milestone Jan 12, 2019
@patrickfav patrickfav self-assigned this Jan 12, 2019
@patrickfav
Copy link
Owner Author

close by 737044a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant