Skip to content

Commit 00de94d

Browse files
tholenstcopybara-github
authored andcommitted
Do not allow "null" for info in decryptAuthenticatedWithEncapsulatedKeyAndP256SharedSecret.
PiperOrigin-RevId: 763418802 Change-Id: I57edf58655dcc7cfb67f222e422c4c2e6a5d354f
1 parent fc8d8ed commit 00de94d

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/main/java/com/google/crypto/tink/hybrid/internal/AuthHpkeHelperForAndroidKeystore.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,8 @@ public byte[] decryptAuthenticatedWithEncapsulatedKeyAndP256SharedSecret(
123123
byte[] dhSharedSecret2,
124124
byte[] ciphertext,
125125
int ciphertextOffset,
126-
byte[] contextInfo)
126+
byte[] info)
127127
throws GeneralSecurityException {
128-
129-
byte[] info = contextInfo;
130-
if (info == null) {
131-
info = new byte[0];
132-
}
133128
byte[] dhSharedSecret = Bytes.concat(dhSharedSecret1, dhSharedSecret2);
134129
byte[] derivedSharedSecret =
135130
NistCurvesHpkeKem.fromCurve(EllipticCurves.CurveType.NIST_P256)

0 commit comments

Comments
 (0)