Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
audiowmark
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
audiowmark
Commits
1fad8725
Commit
1fad8725
authored
Jan 05, 2019
by
Stefan Westerfeld
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Random: remove std namespace prefixes.
Signed-off-by:
Stefan Westerfeld
<
stefan@space.twc.de
>
parent
08fb48f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
random.cc
src/random.cc
+7
-7
No files found.
src/random.cc
View file @
1fad8725
...
...
@@ -8,8 +8,8 @@ using std::vector;
using
std
::
regex
;
using
std
::
regex_match
;
static
std
::
vector
<
unsigned
char
>
aes_key
(
16
);
// 128 bits
static
constexpr
auto
GCRY_CIPHER
=
GCRY_CIPHER_AES128
;
static
vector
<
unsigned
char
>
aes_key
(
16
);
// 128 bits
static
constexpr
auto
GCRY_CIPHER
=
GCRY_CIPHER_AES128
;
static
void
uint64_to_buffer
(
uint64_t
u
,
...
...
@@ -51,7 +51,7 @@ print (const string& label, const vector<unsigned char>& data)
Random
::
Random
(
uint64_t
seed
,
Stream
stream
)
{
std
::
vector
<
unsigned
char
>
ctr
=
get_start_counter
(
seed
,
stream
);
vector
<
unsigned
char
>
ctr
=
get_start_counter
(
seed
,
stream
);
// print ("CTR", ctr);
...
...
@@ -70,7 +70,7 @@ Random::~Random()
gcry_cipher_close
(
aes_ctr_cipher
);
}
std
::
vector
<
unsigned
char
>
vector
<
unsigned
char
>
Random
::
get_start_counter
(
uint64_t
seed
,
Stream
stream
)
{
gcry_error_t
gcry_ret
;
...
...
@@ -82,8 +82,8 @@ Random::get_start_counter (uint64_t seed, Stream stream)
gcry_ret
=
gcry_cipher_setkey
(
cipher_hd
,
&
aes_key
[
0
],
aes_key
.
size
());
die_on_error
(
"gcry_cipher_setkey"
,
gcry_ret
);
std
::
vector
<
unsigned
char
>
cipher_text
(
16
);
std
::
vector
<
unsigned
char
>
plain_text
(
16
);
vector
<
unsigned
char
>
cipher_text
(
16
);
vector
<
unsigned
char
>
plain_text
(
16
);
uint64_to_buffer
(
seed
,
&
plain_text
[
0
]);
...
...
@@ -190,7 +190,7 @@ Random::load_global_key (const string& key_file)
}
}
st
d
::
st
ring
string
Random
::
gen_key
()
{
vector
<
unsigned
char
>
key
(
16
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment