C# Класс StreamCryptor.Model.EncryptedFileHeader

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание

Открытые методы

Метод Описание
EncryptedFileHeader ( ) : System

Initialize the EncryptedFileHeader for decryption.

Used for decryption.

EncryptedFileHeader ( int currentVersion, int nonceLength, int chunkBaseNonceLength, long unencryptedFileLength, byte senderPrivateKey, byte senderPublicKey, byte recipientPublicKey ) : System

Initialize the EncryptedFileHeader for encryption.

ProtectFileName ( string fileName, int fileNameLength ) : void

Encrypts the file name.

SetHeaderChecksum ( int headerChecksumLength ) : void

Sets the header checksum.

ValidateHeaderChecksum ( byte ephemeralKey, int headerChecksumLength ) : void

Validates the header checksum.

Описание методов

EncryptedFileHeader() публичный Метод

Initialize the EncryptedFileHeader for decryption.
Used for decryption.
public EncryptedFileHeader ( ) : System
Результат System

EncryptedFileHeader() публичный Метод

Initialize the EncryptedFileHeader for encryption.
public EncryptedFileHeader ( int currentVersion, int nonceLength, int chunkBaseNonceLength, long unencryptedFileLength, byte senderPrivateKey, byte senderPublicKey, byte recipientPublicKey ) : System
currentVersion int The StreamCryptor version.
nonceLength int The length which nonces will be generated.
chunkBaseNonceLength int The length of the base nonce.
unencryptedFileLength long The length of unencrypted file.
senderPrivateKey byte The senders private key.
senderPublicKey byte The senders public key.
recipientPublicKey byte The recipient public key.
Результат System

ProtectFileName() публичный Метод

Encrypts the file name.
public ProtectFileName ( string fileName, int fileNameLength ) : void
fileName string The file name.
fileNameLength int The length it will be filled up.
Результат void

SetHeaderChecksum() публичный Метод

Sets the header checksum.
public SetHeaderChecksum ( int headerChecksumLength ) : void
headerChecksumLength int The length of the checksum.
Результат void

ValidateHeaderChecksum() публичный Метод

Validates the header checksum.
public ValidateHeaderChecksum ( byte ephemeralKey, int headerChecksumLength ) : void
ephemeralKey byte A 64 byte key.
headerChecksumLength int The length of the checksum.
Результат void