示例#1
0
 /// <summary>
 /// Validate the digital signature against the given key.
 /// </summary>
 /// <param name="data">Data which has been signed.</param>
 /// <param name="signature">Signature over the data.</param>
 /// <param name="key">Key to check the signature against. Must be an instance of RSAPublicKey.</param>
 /// <returns>true for a valid signature, false otherwise.</returns>
 public bool validateData(byte[] data, byte[] signature, Key key)
 {
     Debug.Assert(key is RSAPublicKey, "You need an RSAPublicKey to validate RSA signatures.");
     throw new NotImplementedException();
 }
示例#2
0
 /// <summary>
 /// Sign the given data with the given key.
 /// </summary>
 /// <param name="data">Data to be signed.</param>
 /// <param name="key">Key to be used for the signature. Must be RSAPrivateKey.</param>
 /// <returns>Digital signature.</returns>
 public byte[] signData(byte[] data, Key key)
 {
     Debug.Assert(key is RSAPrivateKey, "You need an RSAPrivateKey to sign messages using RSA.");
     throw new NotImplementedException();
 }
示例#3
0
 /// <summary>
 /// Encrypt the given data with the given key.
 /// </summary>
 /// <param name="data">Data to be encrypted.</param>
 /// <param name="key">Key to encrypt the data. Must be the RSAPublicKey of the recipient.</param>
 /// <returns>Encrypted data.</returns>
 public byte[] encryptData(byte[] data, Key key)
 {
     Debug.Assert(key is RSAPublicKey, "You need an RSAPublicKey to encrypt messages with RSA.");
     throw new NotImplementedException();
 }
示例#4
0
 /// <summary>
 /// Decrypt the given data with the given key.
 /// </summary>
 /// <param name="data">Data to be decrypted.</param>
 /// <param name="key">Key to be used to decrypt the data. Must be the RSAPrivateKey the message was encrypted for.</param>
 /// <returns>Decrypted data.</returns>
 public byte[] decryptData(byte[] data, Key key)
 {
     Debug.Assert(key is RSAPrivateKey, "You need an RSAPrivateKey to decrypt messages with RSA.");
     throw new NotImplementedException();
 }
示例#5
0
 /// <summary>
 /// Validate the digital signature against the given key.
 /// </summary>
 /// <param name="data">Data which has been signed.</param>
 /// <param name="signature">Signature over the data.</param>
 /// <param name="key">Key to check the signature against. Must be an instance of RSAPublicKey.</param>
 /// <returns>true for a valid signature, false otherwise.</returns>
 public bool validateData(byte[] data, byte[] signature, Key key)
 {
     Debug.Assert(key is RSAPublicKey, "You need an RSAPublicKey to validate RSA signatures.");
     throw new NotImplementedException();
 }
示例#6
0
 /// <summary>
 /// Sign the given data with the given key.
 /// </summary>
 /// <param name="data">Data to be signed.</param>
 /// <param name="key">Key to be used for the signature. Must be RSAPrivateKey.</param>
 /// <returns>Digital signature.</returns>
 public byte[] signData(byte[] data, Key key)
 {
     Debug.Assert(key is RSAPrivateKey, "You need an RSAPrivateKey to sign messages using RSA.");
     throw new NotImplementedException();
 }