Table of Contents

Class S2k

Namespace
Org.BouncyCastle.Bcpg
Assembly
BouncyCastle.Cryptography.dll
public class S2k : BcpgObject
Inheritance
S2k
Inherited Members

Remarks

The string to key specifier class.

Constructors

S2k(HashAlgorithmTag)

public S2k(HashAlgorithmTag algorithm)

Parameters

algorithm HashAlgorithmTag

S2k(HashAlgorithmTag, byte[])

public S2k(HashAlgorithmTag algorithm, byte[] iv)

Parameters

algorithm HashAlgorithmTag
iv byte[]

S2k(HashAlgorithmTag, byte[], int)

public S2k(HashAlgorithmTag algorithm, byte[] iv, int itCount)

Parameters

algorithm HashAlgorithmTag
iv byte[]
itCount int

Fields

GnuDummyS2K

public const int GnuDummyS2K = 101

Field Value

int

GnuProtectionModeDivertToCard

public const int GnuProtectionModeDivertToCard = 2

Field Value

int

GnuProtectionModeNoPrivateKey

public const int GnuProtectionModeNoPrivateKey = 1

Field Value

int

Salted

public const int Salted = 1

Field Value

int

SaltedAndIterated

public const int SaltedAndIterated = 3

Field Value

int

Simple

public const int Simple = 0

Field Value

int

Properties

HashAlgorithm

The hash algorithm.

public virtual HashAlgorithmTag HashAlgorithm { get; }

Property Value

HashAlgorithmTag

IterationCount

The iteration count

public virtual long IterationCount { get; }

Property Value

long

ProtectionMode

The protection mode - only if GnuDummyS2K

public virtual int ProtectionMode { get; }

Property Value

int

Type

public virtual int Type { get; }

Property Value

int

Methods

Encode(BcpgOutputStream)

public override void Encode(BcpgOutputStream bcpgOut)

Parameters

bcpgOut BcpgOutputStream

GetIV()

The IV for the key generation algorithm.

public virtual byte[] GetIV()

Returns

byte[]