Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 23 additions & 6 deletions common/src/main/java/org/conscrypt/HpkeSuite.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,7 @@ public HpkeSuite(int kem, int kdf, int aead) {
}

public String name() {
return String.format("%s/%s/%s",
mKem.name(), mKdf.name(), mAead.name());
return String.format("%s/%s/%s", mKem.name(), mKdf.name(), mAead.name());
}

/**
Expand Down Expand Up @@ -109,6 +108,7 @@ public AEAD getAead() {
* @return {@link KEM} representation.
*/
@Deprecated // Use KEM.forId()
@SuppressWarnings("InlineMeSuggester")
public KEM convertKem(int kem) {
return KEM.forId(kem);
}
Expand All @@ -120,6 +120,7 @@ public KEM convertKem(int kem) {
* @return {@link KDF} representation.
*/
@Deprecated // Use KDF.forId()
@SuppressWarnings("InlineMeSuggester")
public KDF convertKdf(int kdf) {
return KDF.forId(kdf);
}
Expand All @@ -131,6 +132,7 @@ public KDF convertKdf(int kdf) {
* @return {@link AEAD} representation.
*/
@Deprecated // Use AEAD.forId()
@SuppressWarnings("InlineMeSuggester")
public AEAD convertAead(int aead) {
return AEAD.forId(aead);
}
Expand Down Expand Up @@ -178,9 +180,11 @@ public int getId() {
* Returns the length in bytes of an encapsulated key produced by this KEM.
*/
@Deprecated // Use getEncapsulatedLength
@SuppressWarnings("InlineMeSuggester")
public int getnEnc() {
return getEncapsulatedLength();
}

public int getEncapsulatedLength() {
return nEnc;
}
Expand Down Expand Up @@ -258,7 +262,9 @@ public int getId() {
public int getMacLength() {
return hLength;
}

@Deprecated // Use getMacLength
@SuppressWarnings("InlineMeSuggester")
public int getHLength() {
return getMacLength();
}
Expand All @@ -278,10 +284,12 @@ public long maxExportLength() {
*
* @return name of mac algorithm used by the kdf.
*/
@Deprecated // Use getMacName
@Deprecated // Use getMacName()
@SuppressWarnings("InlineMeSuggester")
public String getMacAlgorithmName() {
return getMacName();
}

public String getMacName() {
return hName;
}
Expand Down Expand Up @@ -338,13 +346,16 @@ public int getId() {
* Returns the length in bytes of a key for this algorithm.
*
* @return AEAD Nk
* @see <a href="https://www.rfc-editor.org/rfc/rfc9180.html#name-authenticated-encryption-wi">
* @see <a
* href="https://www.rfc-editor.org/rfc/rfc9180.html#name-authenticated-encryption-wi">
* AEAD ids</a>
*/
@Deprecated // Use getKeyLength()
@SuppressWarnings("InlineMeSuggester")
public int getNk() {
return getKeyLength();
}

public int getKeyLength() {
return nk;
}
Expand All @@ -353,13 +364,16 @@ public int getKeyLength() {
* Returns the length in bytes of a nonce for this algorithm.
*
* @return AEAD Nn
* @see <a href="https://www.rfc-editor.org/rfc/rfc9180.html#name-authenticated-encryption-wi">
* @see <a
* href="https://www.rfc-editor.org/rfc/rfc9180.html#name-authenticated-encryption-wi">
* AEAD ids</a>
*/
@Deprecated // Use getNonceLength()
@SuppressWarnings("InlineMeSuggester")
public int getNn() {
return getNonceLength();
}

public int getNonceLength() {
return nn;
}
Expand All @@ -368,13 +382,16 @@ public int getNonceLength() {
* Returns the length in bytes of the AEAD authentication tag for this algorithm.
*
* @return AEAD Nt
* @see <a href="https://www.rfc-editor.org/rfc/rfc9180.html#name-authenticated-encryption-wi">
* @see <a
* href="https://www.rfc-editor.org/rfc/rfc9180.html#name-authenticated-encryption-wi">
* AEAD ids</a>
*/
@Deprecated // Use getTagLength()
@SuppressWarnings("InlineMeSuggester")
public int getNt() {
return nt;
}

public int getTagLength() {
return nt;
}
Expand Down