/// <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(); }
/// <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(); }
/// <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(); }
/// <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(); }