Saves the private key into the supplied stream in Base64-encoded PKCS #8 format.

Namespace:  Rebex.Security.Cryptography.Pkcs
Assembly:  Rebex.Common (in Rebex.Common.dll)

Syntax

Visual Basic
Public Sub Save ( _
	output As Stream, _
	password As String, _
	encryptionAlgorithm As ObjectIdentifier _
)
C#
public void Save(
	Stream output,
	string password,
	ObjectIdentifier encryptionAlgorithm
)

Parameters

output
Type: System.IO..::..Stream
A stream to which to save the private key.
password
Type: System..::..String
Password to encrypted the private key, or null if no encryption desired.
encryptionAlgorithm
Type: Rebex.Security.Cryptography..::..ObjectIdentifier
Encryption algorithm identifier. Ignored if password is null.

Remarks

Currently, 3DES ("1.2.840.113549.3.7"), DES ("1.3.14.3.2.7") and RC2 ("1.2.840.113549.3.2") algorithms are supported.

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also