org.bouncycastle.bcpg

Class S2K

public class S2K extends BCPGObject

The string to key specifier class
Field Summary
static intGNU_DUMMY_S2K
static intSALTED
static intSALTED_AND_ITERATED
static intSIMPLE
Constructor Summary
S2K(int algorithm)
S2K(int algorithm, byte[] iv)
S2K(int algorithm, byte[] iv, int itCount)
Method Summary
voidencode(BCPGOutputStream out)
intgetHashAlgorithm()
return the hash algorithm for this S2K
longgetIterationCount()
return the iteration count
byte[]getIV()
return the iv for the key generation algorithm
intgetProtectionMode()
the protection mode - only if GNU_DUMMY_S2K
intgetType()

Field Detail

GNU_DUMMY_S2K

public static final int GNU_DUMMY_S2K

SALTED

public static final int SALTED

SALTED_AND_ITERATED

public static final int SALTED_AND_ITERATED

SIMPLE

public static final int SIMPLE

Constructor Detail

S2K

public S2K(int algorithm)

S2K

public S2K(int algorithm, byte[] iv)

S2K

public S2K(int algorithm, byte[] iv, int itCount)

Method Detail

encode

public void encode(BCPGOutputStream out)

getHashAlgorithm

public int getHashAlgorithm()
return the hash algorithm for this S2K

getIterationCount

public long getIterationCount()
return the iteration count

getIV

public byte[] getIV()
return the iv for the key generation algorithm

getProtectionMode

public int getProtectionMode()
the protection mode - only if GNU_DUMMY_S2K

getType

public int getType()