Skip to content

libsodium.SKI.SecretStream.Constructor

Andrew Lambert edited this page Nov 26, 2022 · 7 revisions

Method Signatures

 Sub Constructor(Buffer As MemoryBlock, Key As libsodium.SKI.SecretKey, DecryptHeader As MemoryBlock = Nil, HeaderPassword As libsodium.Password = Nil)
 Sub Constructor(Buffer As MemoryBlock, Key As libsodium.PKI.SharedSecret, DecryptHeader As MemoryBlock = Nil, HeaderPassword As libsodium.Password = Nil)

Parameters

Name Type Comment
Buffer MemoryBlock The buffer containing encrypted data, or to which encrypted data should be written.
Key SecretKey or SharedSecret A secret or shared key.
DecryptHeader MemoryBlock The decryption header (decryption only.)
HeaderPassword Password Optional. The password to decrypt the exported DecryptHeader (decryption only.)

Remarks

Constructs an in-memory SecretStream. If the Buffer size is zero then an encryption stream is created, otherwise a decryption stream is created. Decryption requires the original decryption header used to encrypt the stream.

If libsodium is not available at runtime, a PlatformNotSupportedException will be raised.

Clone this wiki locally