From 8f5db23fd18f6f3baacd8cde5b09631e4f87d198 Mon Sep 17 00:00:00 2001 From: Jill Kleiber Date: Mon, 24 Jun 2024 15:14:44 +0200 Subject: [PATCH] pr-1701: reuse type constants --- pg/src/main/java/org/bouncycastle/bcpg/S2K.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pg/src/main/java/org/bouncycastle/bcpg/S2K.java b/pg/src/main/java/org/bouncycastle/bcpg/S2K.java index 0d2889c8d0..ebd143db50 100644 --- a/pg/src/main/java/org/bouncycastle/bcpg/S2K.java +++ b/pg/src/main/java/org/bouncycastle/bcpg/S2K.java @@ -127,7 +127,7 @@ public class S2K public S2K( int algorithm) { - this.type = 0; + this.type = SIMPLE; this.algorithm = algorithm; } @@ -141,7 +141,7 @@ public S2K( int algorithm, byte[] iv) { - this.type = 1; + this.type = SALTED; this.algorithm = algorithm; this.iv = iv; } @@ -158,7 +158,7 @@ public S2K( byte[] iv, int itCount) { - this.type = 3; + this.type = SALTED_AND_ITERATED; this.algorithm = algorithm; this.iv = iv;