8286395: Address possibly lossy conversions in java.security.jgss

Reviewed-by: chegar
This commit is contained in:
Ryan Ernst 2022-06-25 08:00:21 +00:00 committed by Chris Hegarty
parent e93be3acdf
commit a5c25d8837
2 changed files with 3 additions and 3 deletions

View File

@ -272,7 +272,7 @@ public final class Des {
key = set_parity(key);
if (bad_key(key)) {
byte [] temp = long2octet(key);
temp[7] ^= 0xf0;
temp[7] ^= (byte) 0xf0;
key = octet2long(temp);
}
@ -280,7 +280,7 @@ public final class Des {
key = octet2long(set_parity(newkey));
if (bad_key(key)) {
byte [] temp = long2octet(key);
temp[7] ^= 0xf0;
temp[7] ^= (byte) 0xf0;
key = octet2long(temp);
}

View File

@ -157,7 +157,7 @@ public class Des3DkCrypto extends DkCrypto {
}
++posn;
if (bit != 0) {
last |= (bit<<posn);
last |= (byte) (bit<<posn);
}
}