Show / Hide Table of Contents

Class CtrStreamCipher

The CTR cipher as a stream.

Inheritance
Object
CtrStreamCipher
Implements
Org.BouncyCastle.Crypto.IStreamCipher
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: PeerTalk.Cryptography
Assembly: PeerTalk.dll
Syntax
public class CtrStreamCipher : IStreamCipher
Remarks

A copy of SicBlockCipher that implements Org.BouncyCastle.Crypto.IStreamCipher.

Constructors

| Improve this Doc View Source

CtrStreamCipher(IBlockCipher)

Creates a new instance of the CtrStreamCipher with the specified cipher.

Declaration
public CtrStreamCipher(IBlockCipher cipher)
Parameters
Type Name Description
Org.BouncyCastle.Crypto.IBlockCipher cipher

The cipher to produce the output counter. Typically Org.BouncyCastle.Crypto.Engines.AesEngine.

Properties

| Improve this Doc View Source

AlgorithmName

The name of this algorithm.

Declaration
public string AlgorithmName { get; }
Property Value
Type Description
String

Methods

| Improve this Doc View Source

Init(Boolean, ICipherParameters)

Init the cipher.

Declaration
public void Init(bool forEncryption, ICipherParameters parameters)
Parameters
Type Name Description
Boolean forEncryption

Ignored.

Org.BouncyCastle.Crypto.ICipherParameters parameters

Must be a Org.BouncyCastle.Crypto.Parameters.ParametersWithIV.

Examples

var encrypt = new CtrStreamCipher(new AesEngine()); var p = new ParametersWithIV(new KeyParameter(key), iv); encrypt.Init(true, p);

| Improve this Doc View Source

ProcessBytes(Byte[], Int32, Int32, Byte[], Int32)

Declaration
public void ProcessBytes(byte[] input, int inOff, int length, byte[] output, int outOff)
Parameters
Type Name Description
Byte[] input
Int32 inOff
Int32 length
Byte[] output
Int32 outOff
| Improve this Doc View Source

Reset()

Declaration
public void Reset()
| Improve this Doc View Source

ReturnByte(Byte)

Declaration
public byte ReturnByte(byte input)
Parameters
Type Name Description
Byte input
Returns
Type Description
Byte

Implements

Org.BouncyCastle.Crypto.IStreamCipher
  • Improve this Doc
  • View Source
Back to top Generated by DocFX