Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ITS - Intelligent Transport Systems
ITS
Commits
15edfa0f
Commit
15edfa0f
authored
Oct 26, 2016
by
garciay
Browse files
Editorial changes
parent
22ccf05a
Changes
1
Show whitespace changes
Inline
Side-by-side
javasrc/adapter/org/etsi/its/adapter/SecurityHelper.java
View file @
15edfa0f
...
...
@@ -46,12 +46,12 @@ public class SecurityHelper {
_neighborsCertificates
=
new
HashMap
<
Long
,
ByteArrayOutputStream
>();
}
public
byte
[]
size2tls
(
final
int
length
)
{
public
byte
[]
size2tls
(
final
int
intx_value
)
{
byte
[]
result
=
null
;
if
(
length
<
128
)
{
// One byte length
result
=
new
byte
[]
{
(
byte
)
length
};
if
(
intx_value
<
128
)
{
// One byte length
result
=
new
byte
[]
{
(
byte
)
intx_value
};
}
else
{
long
lv
=
length
;
long
lv
=
intx_value
;
long
bitLen
=
bitLength
(
lv
);
long
byteLen
=
byteLength
(
bitLen
);
long
flags
=
(
long
)
((
byteLen
|
1
)
<<
(
byteLen
*
Byte
.
SIZE
-
bitLength
(
byteLen
)
-
1
));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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