Skip to content

Commit b4a17f9

Browse files
updates
1 parent e3045f0 commit b4a17f9

2 files changed

Lines changed: 9 additions & 16 deletions

File tree

doc/snippets/Microsoft.Data.SqlClient/SqlColumnEncryptionKeyStoreProvider.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
Decrypts the specified encrypted value of a column encryption key. The encrypted value is expected to be encrypted using the column master key with the specified key path and using the specified algorithm.
2525
</summary>
2626
<returns>
27-
Returns <see cref="T:System.Byte" /> array representing the decrypted column encryption key.
27+
Returns <see cref="T:System.Byte[]" /> array representing the decrypted column encryption key.
2828
</returns>
2929
</DecryptColumnEncryptionKey>
3030
<DecryptColumnEncryptionKeyAsync>
@@ -41,7 +41,7 @@
4141
Decrypts the specified encrypted value of a column encryption key asynchronously. The encrypted value is expected to be encrypted using the column master key with the specified key path and using the specified algorithm.
4242
</summary>
4343
<returns>
44-
Returns a task that returns <see cref="T:System.Byte" /> array representing the decrypted column encryption key on completion.
44+
Returns a task that returns <see cref="T:System.Byte[]" /> array representing the decrypted column encryption key on completion.
4545
</returns>
4646
</DecryptColumnEncryptionKeyAsync>
4747
<EncryptColumnEncryptionKey>
@@ -58,7 +58,7 @@
5858
Encrypts a column encryption key using the column master key with the specified key path and using the specified algorithm.
5959
</summary>
6060
<returns>
61-
Returns <see cref="T:System.Byte" /> array representing the encrypted column encryption key.
61+
Returns <see cref="T:System.Byte[]" /> array representing the encrypted column encryption key.
6262
</returns>
6363
</EncryptColumnEncryptionKey>
6464
<EncryptColumnEncryptionKeyAsync>
@@ -75,7 +75,7 @@
7575
Encrypts a column encryption key asynchronously using the column master key with the specified key path and using the specified algorithm.
7676
</summary>
7777
<returns>
78-
Returns a task that returns <see cref="T:System.Byte" /> array representing the encrypted column encryption key on completion.
78+
Returns a task that returns <see cref="T:System.Byte[]" /> array representing the encrypted column encryption key on completion.
7979
</returns>
8080
</EncryptColumnEncryptionKeyAsync>
8181
<SignColumnMasterKeyMetadata>

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlColumnEncryptionKeyStoreProvider.cs

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,24 @@ public abstract class SqlColumnEncryptionKeyStoreProvider
1919

2020
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlColumnEncryptionKeyStoreProvider.xml' path='docs/members[@name="SqlColumnEncryptionKeyStoreProvider"]/DecryptColumnEncryptionKeyAsync/*'/>
2121
public virtual Task<byte[]> DecryptColumnEncryptionKeyAsync(string masterKeyPath, string encryptionAlgorithm, byte[] encryptedColumnEncryptionKey)
22-
{
23-
throw new NotImplementedException();
24-
}
22+
=> Task.FromResult(DecryptColumnEncryptionKey(masterKeyPath, encryptionAlgorithm, encryptedColumnEncryptionKey));
2523

2624
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlColumnEncryptionKeyStoreProvider.xml' path='docs/members[@name="SqlColumnEncryptionKeyStoreProvider"]/EncryptColumnEncryptionKey/*'/>
2725
public abstract byte[] EncryptColumnEncryptionKey(string masterKeyPath, string encryptionAlgorithm, byte[] columnEncryptionKey);
2826

2927
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlColumnEncryptionKeyStoreProvider.xml' path='docs/members[@name="SqlColumnEncryptionKeyStoreProvider"]/EncryptColumnEncryptionKeyAsync/*'/>
3028
public virtual Task<byte[]> EncryptColumnEncryptionKeyAsync(string masterKeyPath, string encryptionAlgorithm, byte[] columnEncryptionKey)
31-
{
32-
throw new NotImplementedException();
33-
}
29+
=> Task.FromResult(EncryptColumnEncryptionKey(masterKeyPath, encryptionAlgorithm, columnEncryptionKey));
3430

3531
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlColumnEncryptionKeyStoreProvider.xml' path='docs/members[@name="SqlColumnEncryptionKeyStoreProvider"]/SignColumnMasterKeyMetadata/*'/>
3632
public virtual byte[] SignColumnMasterKeyMetadata(string masterKeyPath, bool allowEnclaveComputations)
3733
{
3834
throw new NotImplementedException();
3935
}
36+
4037
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlColumnEncryptionKeyStoreProvider.xml' path='docs/members[@name="SqlColumnEncryptionKeyStoreProvider"]/SignColumnMasterKeyMetadataAsync/*'/>
4138
public virtual Task<byte[]> SignColumnMasterKeyMetadataAsync(string masterKeyPath, bool allowEnclaveComputations)
42-
{
43-
throw new NotImplementedException();
44-
}
39+
=> Task.FromResult(SignColumnMasterKeyMetadata(masterKeyPath, allowEnclaveComputations));
4540

4641
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlColumnEncryptionKeyStoreProvider.xml' path='docs/members[@name="SqlColumnEncryptionKeyStoreProvider"]/VerifyColumnMasterKeyMetadata/*'/>
4742
public virtual bool VerifyColumnMasterKeyMetadata(string masterKeyPath, bool allowEnclaveComputations, byte[] signature)
@@ -51,8 +46,6 @@ public virtual bool VerifyColumnMasterKeyMetadata(string masterKeyPath, bool all
5146

5247
/// <include file='../../../../../../doc/snippets/Microsoft.Data.SqlClient/SqlColumnEncryptionKeyStoreProvider.xml' path='docs/members[@name="SqlColumnEncryptionKeyStoreProvider"]/VerifyColumnMasterKeyMetadataAsync/*'/>
5348
public virtual Task<bool> VerifyColumnMasterKeyMetadataAsync(string masterKeyPath, bool allowEnclaveComputations, byte[] signature)
54-
{
55-
throw new NotImplementedException();
56-
}
49+
=> Task.FromResult(VerifyColumnMasterKeyMetadata(masterKeyPath, allowEnclaveComputations, signature));
5750
}
5851
}

0 commit comments

Comments
 (0)