Skip to content

Commit

Permalink
Use a reference for VectorToArray (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
markusfisch authored Apr 23, 2022
1 parent 1941161 commit 36d7ea2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/AES.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ std::vector<unsigned char> AES::ArrayToVector(unsigned char *a,
return v;
}

unsigned char *AES::VectorToArray(std::vector<unsigned char> a) {
unsigned char *AES::VectorToArray(std::vector<unsigned char> &a) {
return a.data();
}

Expand Down
2 changes: 1 addition & 1 deletion src/AES.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class AES {

std::vector<unsigned char> ArrayToVector(unsigned char *a, unsigned int len);

unsigned char *VectorToArray(std::vector<unsigned char> a);
unsigned char *VectorToArray(std::vector<unsigned char> &a);

public:
explicit AES(AESKeyLength keyLength = AESKeyLength::AES_256);
Expand Down

0 comments on commit 36d7ea2

Please sign in to comment.