// NOTE: Unlike MS we need this method // LAMESPEC: Not available from MS .NET framework but MS don't tell // why! DON'T USE IT UNLESS YOU KNOW WHAT YOU ARE DOING!!! You should // only encrypt/decrypt session (secret) key using asymmetric keys. // Using this method to decrypt data IS dangerous (and very slow). public override byte[] DecryptValue(byte[] rgb) { if (!rsa.IsCrtPossible) { throw new CryptographicException("Incomplete private key - missing CRT."); } return(rsa.DecryptValue(rgb)); }