Skip to content

Commit 8f5db23

Browse files
author
Jill Kleiber
committed
pr-1701: reuse type constants
1 parent 15c42c0 commit 8f5db23

File tree

1 file changed

+3
-3
lines changed
  • pg/src/main/java/org/bouncycastle/bcpg

1 file changed

+3
-3
lines changed

pg/src/main/java/org/bouncycastle/bcpg/S2K.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public class S2K
127127
public S2K(
128128
int algorithm)
129129
{
130-
this.type = 0;
130+
this.type = SIMPLE;
131131
this.algorithm = algorithm;
132132
}
133133

@@ -141,7 +141,7 @@ public S2K(
141141
int algorithm,
142142
byte[] iv)
143143
{
144-
this.type = 1;
144+
this.type = SALTED;
145145
this.algorithm = algorithm;
146146
this.iv = iv;
147147
}
@@ -158,7 +158,7 @@ public S2K(
158158
byte[] iv,
159159
int itCount)
160160
{
161-
this.type = 3;
161+
this.type = SALTED_AND_ITERATED;
162162
this.algorithm = algorithm;
163163
this.iv = iv;
164164

0 commit comments

Comments
 (0)