Show / Hide Table of Contents

Class SemanticEncryption

Provides methods that perform key wrapping based on the encryption purpose and use in the Smartcrypt Protocol.

Inheritance
Object
SemanticEncryption
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: PKWARE.Smartcrypt.Protocol
Assembly: SmartcryptProtocol.dll
Syntax
public static class SemanticEncryption

Methods

DecryptGroupKey(ICryptoProvider, String, Byte[])

Decrypts a GroupKey.

Declaration
[Pure]
[NotNull]
public static byte[] DecryptGroupKey(this ICryptoProvider cryptoProvider, [NotNull] string data, [NotNull] byte[] privateKey)
Parameters
Type Name Description
ICryptoProvider cryptoProvider

The ICryptoProvider to use for cryptographic primitives.

String data

The data to decrypt.

Byte[] privateKey

The RSA private key of the identity for which the original data was encrypted.

Returns
Type Description
Byte[]

The decrypted data.

Exceptions
Type Condition
MetaClientException

With Category of CategoryUpgrade if the data are newer than understood by this software. With Category of CategoryInternal if the data are in an invalid format.

See Also
EncryptMasterKey(ICryptoProvider, Byte[], String)

DecryptHybrid(ICryptoProvider, String, Byte[])

Decrypts a HybridEncryption ciphertext.

Declaration
[Pure]
[NotNull]
public static byte[] DecryptHybrid(this ICryptoProvider cryptoProvider, [NotNull] string data, [NotNull] byte[] privateKey)
Parameters
Type Name Description
ICryptoProvider cryptoProvider

The ICryptoProvider to use for cryptographic primitives.

String data

The data to decrypt.

Byte[] privateKey

The RSA private key of the identity for which the original data was encrypted.

Returns
Type Description
Byte[]

The decrypted data.

Exceptions
Type Condition
MetaClientException

With Category of CategoryUpgrade if the data are newer than understood by this software. With Category of CategoryInternal if the data are in an invalid format.

DecryptMasterKey(ICryptoProvider, String, Byte[])

Decrypts a MasterKey.

Declaration
[Pure]
[NotNull]
public static byte[] DecryptMasterKey(this ICryptoProvider cryptoProvider, [NotNull] string data, [NotNull] byte[] privateKey)
Parameters
Type Name Description
ICryptoProvider cryptoProvider

The ICryptoProvider to use for cryptographic primitives.

String data

The data to decrypt.

Byte[] privateKey

The RSA private key of the identity for which the original data was encrypted.

Returns
Type Description
Byte[]

The decrypted data.

Exceptions
Type Condition
MetaClientException

With Category of CategoryUpgrade if the data are newer than understood by this software. With Category of CategoryInternal if the data are in an invalid format.

See Also
EncryptMasterKey(ICryptoProvider, Byte[], String)

EncryptGroupKey(ICryptoProvider, Byte[], String)

Encrypts a GroupKey.

Declaration
[Pure]
[NotNull]
public static string EncryptGroupKey(this ICryptoProvider cryptoProvider, [NotNull] byte[] data, [NotNull] string recipientPublicKey)
Parameters
Type Name Description
ICryptoProvider cryptoProvider

The ICryptoProvider to use for cryptographic primitives.

Byte[] data

The data to encrypt.

String recipientPublicKey

The RSA public key of the recipient.

Returns
Type Description
String

The encrypted data.

Exceptions
Type Condition
MetaClientException

With Category of CategoryUpgrade if the data are newer than understood by this software. With Category of CategoryInternal if the data are in an invalid format.

See Also
DecryptGroupKey(ICryptoProvider, String, Byte[])

EncryptHybrid(ICryptoProvider, Byte[], String)

Encrypts using HybridEncryption.

Declaration
[Pure]
[NotNull]
public static string EncryptHybrid(this ICryptoProvider cryptoProvider, [NotNull] byte[] data, [NotNull] string recipientPublicKey)
Parameters
Type Name Description
ICryptoProvider cryptoProvider

The ICryptoProvider to use for cryptographic primitives.

Byte[] data

The data to encrypt.

String recipientPublicKey

The RSA public key of the recipient.

Returns
Type Description
String

The encrypted data.

Exceptions
Type Condition
MetaClientException

With Category of CategoryUpgrade if the data are newer than understood by this software. With Category of CategoryInternal if the data are in an invalid format.

See Also
DecryptGroupKey(ICryptoProvider, String, Byte[])

EncryptMasterKey(ICryptoProvider, Byte[], String)

Encrypts a MasterKey.

Declaration
[Pure]
[NotNull]
public static string EncryptMasterKey(this ICryptoProvider cryptoProvider, [NotNull] byte[] data, [NotNull] string recipientPublicKey)
Parameters
Type Name Description
ICryptoProvider cryptoProvider

The ICryptoProvider to use for cryptographic primitives.

Byte[] data

The data to encrypt.

String recipientPublicKey

The RSA public key of the recipient.

Returns
Type Description
String

The encrypted data.

Exceptions
Type Condition
MetaClientException

With Category of CategoryUpgrade if the data are newer than understood by this software. With Category of CategoryInternal if the data are in an invalid format.

See Also
DecryptMasterKey(ICryptoProvider, String, Byte[])

See Also

EncryptionPurpose
SmartcryptCrypto
Back to top Copyright © 2018 PKWARE, Inc.