Show / Hide Table of Contents

Encrypt(DataProtectionStore,Byte[],Byte[]) Method

Specifies which key store to use (User or Machine)

The plain, or unencrypted, bytes to encrypt

The entropy, or "password" to use to encryptthis data. The value must be used to decrypt the data.

Encrypts a byte array using the specified entropy

Syntax

'Declaration

Public Overloads Shared Function Encrypt( _
   ByVal _keyStore_ As DataProtectionStore, _
   ByVal _plainBytes_() As Byte, _
   ByVal _entropy_() As Byte _
) As Byte()
public static byte[] Encrypt(
   DataProtectionStore _keyStore_,
   byte[] _plainBytes_,
   byte[] _entropy_
)

Parameters

keyStore

Specifies which key store to use (User or Machine)

plainBytes

The plain, or unencrypted, bytes to encrypt

entropy

The entropy, or "password" to use to encryptthis data. The value must be used to decrypt the data.

Return Value

A byte array representing the encrypted version of the original plainBytes payload

Remarks

It is important not to lose the entropy used to encrypt this data. If the entropy is lost, the data cannot be decrypted. If the entropy must be stored, do not store it with the encrypted payload.

warning** WARNING**: The encryption produced by this class is only usable from the machine on which the encryption occurred. The encrypted text cannot be used by a different computer.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server family

Reference

DataProtector Class DataProtector Members Overload List

Back to top © 2022 Dovetail Software, Inc. - All rights reserved.
Clarify, Amdocs, and related products and names are copyright and trademark of Amdocs, Inc.
.NET, Visual Studio.NET, C#, Visual Basic and related products are trademark of Microsoft corporation.