Show / Hide Table of Contents

Class RSACryptoTransform

Implementa una transformación criptográfica para encriptar datos por medio del algoritmo RSA.

Inheritance
object
Disposable
RSACryptoTransform
Implements
IDisposableEx
ICryptoTransform
IDisposable
Inherited Members
Disposable.IsDisposed
Disposable.Dispose(bool)
Disposable.OnFinalize()
Disposable.Dispose()
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: TheXDS.MCART.Security.Cryptography
Assembly: MCART.Windows.dll
Syntax
public class RSACryptoTransform : Disposable, IDisposableEx, ICryptoTransform, IDisposable

Constructors

| Edit this page View Source

RSACryptoTransform()

Inicializa una nueva instancia de la clase RSACryptoTransform, generando una clave RSA de 4096 bits.

Declaration
public RSACryptoTransform()
| Edit this page View Source

RSACryptoTransform(byte[])

Inicializa una nueva instancia de la clase RSACryptoTransform, especificando un blob de bytes con el contenido de la configuración a utilizar para inicializar el RSA.

Declaration
public RSACryptoTransform(byte[] keyBlob)
Parameters
Type Name Description
byte[] keyBlob

Blob binario de configuración de las claves RSA.

| Edit this page View Source

RSACryptoTransform(int)

Inicializa una nueva instancia de la clase RSACryptoTransform especificando el tamaño a utilizar para generar las claves RSA.

Declaration
public RSACryptoTransform(int keySize)
Parameters
Type Name Description
int keySize

Tamaño de la clave RSA a generar.

| Edit this page View Source

RSACryptoTransform(int, CspParameters)

Inicializa una nueva instancia de la clase RSACryptoTransform, especificando los parámetros de configuración a utilizar para inicializar el RSA.

Declaration
public RSACryptoTransform(int dwKeySize, CspParameters parameters)
Parameters
Type Name Description
int dwKeySize

Tamaño de la clave RSA a utilizar.

CspParameters parameters

Parámetros de inicialización del RSA.

| Edit this page View Source

RSACryptoTransform(CspParameters)

Inicializa una nueva instancia de la clase RSACryptoTransform, especificando los parámetros de configuración a utilizar para inicializar el RSA.

Declaration
public RSACryptoTransform(CspParameters parameters)
Parameters
Type Name Description
CspParameters parameters

Parámetros de inicialización del RSA.

| Edit this page View Source

RSACryptoTransform(RSACryptoServiceProvider)

Inicializa una nueva instancia de la clase RSACryptoTransform.

Declaration
public RSACryptoTransform(RSACryptoServiceProvider rsa)
Parameters
Type Name Description
RSACryptoServiceProvider rsa
| Edit this page View Source

RSACryptoTransform(RSAParameters)

Inicializa una nueva instancia de la clase RSACryptoTransform, especificando los parámetros de configuración a utilizar para inicializar el RSA.

Declaration
public RSACryptoTransform(RSAParameters parameters)
Parameters
Type Name Description
RSAParameters parameters

Parámetros de inicialización del RSA.

Properties

| Edit this page View Source

CanReuseTransform

Indica si este ICryptoTransform puede ser reutilizado para transformar más de un bloque.

Declaration
public bool CanReuseTransform { get; }
Property Value
Type Description
bool
| Edit this page View Source

CanTransformMultipleBlocks

Indica si este ICryptoTransform puede transformar múltiples bloques.

Declaration
public bool CanTransformMultipleBlocks { get; }
Property Value
Type Description
bool
| Edit this page View Source

InputBlockSize

Obtiene el tamaño de entrada del bloque a transformar.

Declaration
public int InputBlockSize { get; }
Property Value
Type Description
int
| Edit this page View Source

OutputBlockSize

Obtiene el tamaño de salida del bloque.

Declaration
public int OutputBlockSize { get; }
Property Value
Type Description
int

Methods

| Edit this page View Source

GetRSACspBlob(bool)

Obtiene los parámetros RSA para este RSACryptoTransform.

Declaration
public byte[] GetRSACspBlob(bool includePrivateParameters)
Parameters
Type Name Description
bool includePrivateParameters

Indica si deben incluirse los parámetros de clave privada en el valor exportado.

Returns
Type Description
byte[]

Los parámetros RSA para este RSACryptoTransform.

| Edit this page View Source

GetRSAParameters(bool)

Obtiene los parámetros RSA para este RSACryptoTransform.

Declaration
public RSAParameters GetRSAParameters(bool includePrivateParameters)
Parameters
Type Name Description
bool includePrivateParameters

Indica si deben incluirse los parámetros de clave privada en el valor exportado.

Returns
Type Description
RSAParameters

Los parámetros RSA para este RSACryptoTransform.

| Edit this page View Source

OnDispose()

Libera los recursos utilizados por este objeto.

Declaration
protected override void OnDispose()
Overrides
Disposable.OnDispose()
| Edit this page View Source

ToStream(Stream, RSACryptoServiceProvider)

Instancia un nuevo CryptoStream utilizando la instancia de RSACryptoServiceProvider para crear un nuevo RSACryptoTransform.

Declaration
public static CryptoStream ToStream(Stream stream, RSACryptoServiceProvider rsa)
Parameters
Type Name Description
Stream stream

Flujo sobre el cual escribir los datos encriptados.

RSACryptoServiceProvider rsa

Instancia de RSACryptoServiceProvider a utilizar para construir el nuevo RSACryptoTransform

Returns
Type Description
CryptoStream

Un nuevo CryptoStream con el destino y el objeto de transformación especificados.

| Edit this page View Source

TransformBlock(byte[], int, int, byte[], int)

Efectúa la transformación de un bloque de datos.

Declaration
public int TransformBlock(byte[] inputBuffer, int inputOffset, int inputCount, byte[] outputBuffer, int outputOffset)
Parameters
Type Name Description
byte[] inputBuffer

Búfer de datos a transformar.

int inputOffset

Offset del búfer de entrada a partir del cual tomar datos.

int inputCount

Cantidad de bytes del búfer de entrada a tomar para la transformación.

byte[] outputBuffer

Búfer de salida de la transformación.

int outputOffset

Offset del búfer de salida en el cual empezar a escribir datos.

Returns
Type Description
int

La cantidad de bytes escritos en el búfer de salida.

| Edit this page View Source

TransformFinalBlock(byte[], int, int)

Efectúa la transformación de un bloque de datos.

Declaration
public byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount)
Parameters
Type Name Description
byte[] inputBuffer

Búfer de datos a transformar.

int inputOffset

Offset del búfer de entrada a partir del cual tomar datos.

int inputCount

Cantidad de bytes del búfer de entrada a tomar para la transformación.

Returns
Type Description
byte[]

Un bloque de datos con el resultado de la transformación.

Implements

IDisposableEx
ICryptoTransform
IDisposable

Extension Methods

Objects.ShallowCopyTo(object, object, Type)
ObjectExtensions.FieldsOf<T>(object)
ObjectExtensions.GetAttribute<T>(object)
ObjectExtensions.GetAttributes<T>(object)
ObjectExtensions.HasAttrValue<TAttribute, TValue>(object, out TValue)
ObjectExtensions.HasAttribute<T>(object)
ObjectExtensions.HasAttribute<T>(object, out T?)
ObjectExtensions.HasAttributes<T>(object, out IEnumerable<T>?)
ObjectExtensions.Is(object?, object?)
ObjectExtensions.IsEither(object, IEnumerable)
ObjectExtensions.IsEither(object, params object[])
ObjectExtensions.IsNeither(object, IEnumerable)
ObjectExtensions.IsNeither(object, params object[])
ObjectExtensions.IsNot(object?, object?)
ObjectExtensions.PropertiesOf<T>(object)
ObjectExtensions.WhichAre(object, IEnumerable<object>)
ObjectExtensions.WhichAre(object, params object[])
Common.IfNotNull<T>(T?, Action<T>)
Objects.Itself<T>(T)
Objects.ShallowClone<T>(T)
Objects.ShallowCopyTo<T>(T, T)
CollectionExtensions.PushInto<TItem, TCollection>(TItem, ICollection<TCollection>)
DictionaryExtensions.PushInto<TKey, TValue>(TValue, TKey, IDictionary<TKey, TValue>)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX