Class DesEngine
- Namespace
- Org.BouncyCastle.Crypto.Engines
- Assembly
- BouncyCastle.Cryptography.dll
public class DesEngine : IBlockCipher
- Inheritance
-
DesEngine
- Implements
- Derived
- Inherited Members
Remarks
A class that provides a basic DES engine.
Properties
AlgorithmName
The name of the algorithm this cipher implements.
public virtual string AlgorithmName { get; }
Property Value
Methods
GenerateWorkingKey(bool, byte[])
protected static int[] GenerateWorkingKey(bool encrypting, byte[] key)
Parameters
Returns
- int[]
GetBlockSize()
public virtual int GetBlockSize()
Returns
- int
The block size for this cipher, in bytes.
GetWorkingKey()
public virtual int[] GetWorkingKey()
Returns
- int[]
Init(bool, ICipherParameters)
public virtual void Init(bool forEncryption, ICipherParameters parameters)
Parameters
forEncryptionboolparametersICipherParameters
ProcessBlock(byte[], int, byte[], int)
Process a block.
public virtual int ProcessBlock(byte[] input, int inOff, byte[] output, int outOff)
Parameters
inputbyte[]inOffintThe offset into that the input block begins.
outputbyte[]outOffintThe offset into to write the output block.
Returns
- int
The number of bytes processed and produced.
Exceptions
- DataLengthException
If input block is wrong size, or outBuf too small.
ProcessBlock(ReadOnlySpan<byte>, Span<byte>)
Process a block.
public virtual int ProcessBlock(ReadOnlySpan<byte> input, Span<byte> output)
Parameters
inputReadOnlySpan<byte>The input block as a span.
outputSpan<byte>The output span.
Returns
- int
The number of bytes processed and produced.
Exceptions
- DataLengthException
If input block is wrong size, or output span too small.