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 copy(::AESBlock) #13

Merged
merged 2 commits into from
Aug 18, 2020
Merged

Conversation

martinholters
Copy link
Contributor

Either this or an implementation of unaliascopy is needed if a proper dataids is added, as JuliaLang/julia#26237 proposes. I don't see any reason not to specialize copy like this here. (Without this, a Vector{UInt8} is returned.)

I didn't know where to add tests. They should probably look something like

a=AES.AESBlock(rand(UInt8, 100), 3)
ac=copy(a)
@test ac == a
@test ac !== a
@test ac isa AES.AESBlock

@kanav99
Copy link
Owner

kanav99 commented Aug 18, 2020

Thank you @martinholters ! I have added the tests. I have been inactive on this repository, but if you think you need some more features, do let me know, I plan on extending the functionality.

@martinholters
Copy link
Contributor Author

I only came here from looking at the failures in JuliaLang/julia#26237, I'm not actually using your package for anything (yet)---sorry. Although it just so happens that I give a course in croptography...

@kanav99
Copy link
Owner

kanav99 commented Aug 18, 2020

Ohh awesome, no worries!

@kanav99 kanav99 merged commit a825d08 into kanav99:master Aug 18, 2020
@martinholters martinholters deleted the mh/copy-aesblock branch August 18, 2020 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants