C# Class Org.BouncyCastle.Bcpg.OpenPgp.PgpUtilities

Basic utility class.
Show file Open project: red-gate/iTextSharp-4.1.6 Class Usage Examples

Public Methods

Method Description
DsaSigToMpi ( byte encoding ) : MPInteger[]
GetDecoderStream ( Stream inputStream ) : Stream

Return either an ArmoredInputStream or a BcpgInputStream based on whether the initial characters of the stream are binary PGP encodings or not.

GetDigestName ( HashAlgorithmTag hashAlgorithm ) : string
GetKeySize ( SymmetricKeyAlgorithmTag algorithm ) : int
GetSignatureName ( PublicKeyAlgorithmTag keyAlgorithm, HashAlgorithmTag hashAlgorithm ) : string
GetSymmetricCipherName ( SymmetricKeyAlgorithmTag algorithm ) : string
MakeKey ( SymmetricKeyAlgorithmTag algorithm, byte keyBytes ) : KeyParameter
MakeKeyFromPassPhrase ( SymmetricKeyAlgorithmTag algorithm, S2k s2k, char passPhrase ) : KeyParameter
MakeRandomKey ( SymmetricKeyAlgorithmTag algorithm, SecureRandom random ) : KeyParameter
RsaSigToMpi ( byte encoding ) : MPInteger[]
WriteFileToLiteralData ( Stream outputStream, char fileType, FileInfo file ) : void

Write out the passed in file as a literal data packet.

WriteFileToLiteralData ( Stream outputStream, char fileType, FileInfo file, byte buffer ) : void

Write out the passed in file as a literal data packet in partial packet format.

Private Methods

Method Description
IsPossiblyBase64 ( int ch ) : bool
PgpUtilities ( ) : System

Method Details

DsaSigToMpi() public static method

public static DsaSigToMpi ( byte encoding ) : MPInteger[]
encoding byte
return MPInteger[]

GetDecoderStream() public static method

Return either an ArmoredInputStream or a BcpgInputStream based on whether the initial characters of the stream are binary PGP encodings or not.
public static GetDecoderStream ( Stream inputStream ) : Stream
inputStream Stream
return Stream

GetDigestName() public static method

public static GetDigestName ( HashAlgorithmTag hashAlgorithm ) : string
hashAlgorithm HashAlgorithmTag
return string

GetKeySize() public static method

public static GetKeySize ( SymmetricKeyAlgorithmTag algorithm ) : int
algorithm SymmetricKeyAlgorithmTag
return int

GetSignatureName() public static method

public static GetSignatureName ( PublicKeyAlgorithmTag keyAlgorithm, HashAlgorithmTag hashAlgorithm ) : string
keyAlgorithm PublicKeyAlgorithmTag
hashAlgorithm HashAlgorithmTag
return string

GetSymmetricCipherName() public static method

public static GetSymmetricCipherName ( SymmetricKeyAlgorithmTag algorithm ) : string
algorithm SymmetricKeyAlgorithmTag
return string

MakeKey() public static method

public static MakeKey ( SymmetricKeyAlgorithmTag algorithm, byte keyBytes ) : KeyParameter
algorithm SymmetricKeyAlgorithmTag
keyBytes byte
return Org.BouncyCastle.Crypto.Parameters.KeyParameter

MakeKeyFromPassPhrase() public static method

public static MakeKeyFromPassPhrase ( SymmetricKeyAlgorithmTag algorithm, S2k s2k, char passPhrase ) : KeyParameter
algorithm SymmetricKeyAlgorithmTag
s2k S2k
passPhrase char
return Org.BouncyCastle.Crypto.Parameters.KeyParameter

MakeRandomKey() public static method

public static MakeRandomKey ( SymmetricKeyAlgorithmTag algorithm, SecureRandom random ) : KeyParameter
algorithm SymmetricKeyAlgorithmTag
random Org.BouncyCastle.Security.SecureRandom
return Org.BouncyCastle.Crypto.Parameters.KeyParameter

RsaSigToMpi() public static method

public static RsaSigToMpi ( byte encoding ) : MPInteger[]
encoding byte
return MPInteger[]

WriteFileToLiteralData() public static method

Write out the passed in file as a literal data packet.
public static WriteFileToLiteralData ( Stream outputStream, char fileType, FileInfo file ) : void
outputStream Stream
fileType char
file System.IO.FileInfo
return void

WriteFileToLiteralData() public static method

Write out the passed in file as a literal data packet in partial packet format.
public static WriteFileToLiteralData ( Stream outputStream, char fileType, FileInfo file, byte buffer ) : void
outputStream Stream
fileType char
file System.IO.FileInfo
buffer byte
return void