Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vanitasvitae committed Apr 24, 2024
1 parent e8dd0a8 commit 6d2ab4e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pg/src/main/java/org/bouncycastle/bcpg/SignaturePacket.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ public class SignaturePacket
/**
* Parse a version 2 or version 3 signature.
* @param in input stream which already skipped over the version number
* @throws IOException
* @throws IOException if the packet is malformed
*
* @see <a href="https://www.rfc-editor.org/rfc/rfc4880.html#section-5.2.2">
* Version 3 packet format</a>
*/
private void parseV2_V3(BCPGInputStream in)
throws IOException {
int l = in.read();
int l = in.read(); // length l MUST be 5

signatureType = in.read();
creationTime = StreamUtil.readTime(in);
Expand All @@ -90,7 +90,7 @@ private void parseV2_V3(BCPGInputStream in)
* Parse a version 4 or version 5 signature.
* The difference between version 4 and 5 is that a version 5 signature contains additional metadata.
* @param in input stream which already skipped over the version number
* @throws IOException
* @throws IOException if the packet is malformed
*
* @see <a href="https://www.rfc-editor.org/rfc/rfc4880.html#section-5.2.3">
* Version 4 packet format</a>
Expand All @@ -116,7 +116,7 @@ private void parseV4_V5(BCPGInputStream in) throws IOException {
* Version 6 signatures do use 4 octet subpacket area length descriptors and contain an additional salt value
* (which may or may not be of size 0, librepgp and crypto-refresh are in disagreement here).
* @param in input stream which already skipped over the version number
* @throws IOException
* @throws IOException if the packet is malformed
*
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-version-4-and-6-signature-p">
* Version 6 packet format</a>
Expand Down Expand Up @@ -144,7 +144,7 @@ private void parseV6(BCPGInputStream in) throws IOException {
* Version 4 and 5 signature encode the area length using 2 octets, while version 6 uses 4 octet lengths instead.
*
* @param in input stream which skipped to after the hash algorithm octet
* @throws IOException
* @throws IOException if the packet is malformed
*/
private void parseSubpackets(BCPGInputStream in) throws IOException {
int hashedLength;
Expand Down Expand Up @@ -226,7 +226,7 @@ else if (p instanceof SignatureCreationTime)
* signatureEncoding directly.
*
* @param in input stream which skipped the head of the signature
* @throws IOException
* @throws IOException if the packet is malformed
*/
private void parseSignature(BCPGInputStream in) throws IOException {
switch (keyAlgorithm)
Expand Down

0 comments on commit 6d2ab4e

Please sign in to comment.