Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.24
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.bouncycastle.bcpg
Class S2K

    java.lang.Object
      |
      +--org.bouncycastle.bcpg.BCPGObject
            |
            +--org.bouncycastle.bcpg.S2K

public class S2K
extends BCPGObject

The string to key specifier class

Field Summary
`static int` | `SALTED`
`static int` | `SALTED_AND_ITERATED`
`static int` | `SIMPLE`

Constructor Summary
`S2K(int algorithm)`
`S2K(int algorithm, byte[] iv)`
`S2K(int algorithm, byte[] iv, int itCount)`

Method Summary
`void` | `encode(BCPGOutputStream out)`
`int` | `getHashAlgorithm()` return the hash algorithm for this S2K
`long` | `getIterationCount()` return the iteration count
`byte[]` | `getIV()` return the iv for the key generation algorithm
`int` | `getType()`

Methods inherited from class org.bouncycastle.bcpg.BCPGObject
`getEncoded`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SIMPLE

    public static final int SIMPLE

See Also:
  Constant Field Values

### SALTED

    public static final int SALTED

See Also:
  Constant Field Values

### SALTED_AND_ITERATED

    public static final int SALTED_AND_ITERATED

See Also:
  Constant Field Values

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

### getType

    public int getType()

### getHashAlgorithm

    public int getHashAlgorithm()

  return the hash algorithm for this S2K

### getIV

    public byte[] getIV()

  return the iv for the key generation algorithm

### getIterationCount

    public long getIterationCount()

  return the iteration count

### encode

    public void encode(BCPGOutputStream out)
                throws java.io.IOException

  Specified by:
    `encode` in class `BCPGObject`
    `java.io.IOException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Bouncy Castle Cryptography 1.24
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD