SignByAsymKey (Transact-SQL)
Bir asimetrik anahtar işaretleri düz metin
SignByAsymKey( Asym_Key_ID , @plaintext [ , 'password' ] )
Bağımsız değişkenler
Asym_Key_ID
Is the ID of an asymmetric key in the current database.Asym_Key_ID isint.@ düz metin
Türünde bir değişken mi nvarchar, char, varchar, veya nchar asimetrik anahtar ile imzalanmış bir veri içeren.password
Is the password with which the private key is protected.password is nvarchar(128).
Dönüş Türleri
varbinary bir en büyük boyutu çok 8.000 bayt ile.
Remarks
Asimetrik anahtar DENETIM izni gerektirir.
Örnekler
Aşağıdaki örnek, bir tablo oluşturur. SignedData04, düz metin ve imzası depolanacağı. Bu sonraki kayıt asimetrik anahtar ile imzalanmış bir tablo ekler PrimeKey, ilk olduğu parolayla şifresi... 'pGFD4bb925DGvbd2439587y'.
-- Create a table in which to store the data
CREATE TABLE [SignedData04]( Description nvarchar(max), Data nvarchar(max), DataSignature varbinary(8000) );
GO
-- Store data together with its signature
DECLARE @clear_text_data nvarchar(max);
set @clear_text_data = N'Important numbers 2, 3, 5, 7, 11, 13, 17,
19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79,
83, 89, 97';
INSERT INTO [SignedData04]
VALUES( N'data encrypted by asymmetric key ''PrimeKey''',
@clear_text_data, SignByAsymKey( AsymKey_Id( 'PrimeKey' ),
@clear_text_data, N'pGFD4bb925DGvbd2439587y' ));
GO