decrypt

How does one decrypt a PDF with an owner password, but no user password?

Although the PDF specification is available from Adobe, it's not exactly the simplest document to read through. PDF allows documents to be encrypted so that either a user password and/or an owner password is required to do various things with the document (display, print, etc). A common use is to lock a PDF so that end users can read i...

Encrypt/Decrypt string in .NET

Can someone give me the code to Encrypt and Decrypt a string in C#? I'm trying to do this with TripleDES but that is not a requirement. ...

Java/JCE: Decrypting "long" message encrypted with RSA

I've got a message contained in an byte[], encrypted with "RSA/ECB/PKCS1Padding". To decrypt it I create a Cipher c and initiate it with c = Cipher.getInstance("RSA/ECB/PKCS1Padding"); Untill now I have only decrypted small messages, using the doFinal() method, returning an byte[] with the decrypted bytes. c.init(Cipher.DECRYPT_MODE...

Need an example - decrypting string in Java using Microsoft Crypto API

First and foremost, I am not a Java programmer. I'm looking for an example solution to this problem because the Java developer I have does not have much experience working with encryption. Everything we've found online pertains to encrypting web pages and dealing with the MS keystore. We just want to work with a single string from Pow...

Encrypt in JSP, Decrypt in PHP

Hi, I'm trying to implement a single-sign-on link from application written in JAVA, to another web app written in PHP. I'd like a way to encrypt the username in .JSP and then decrypt in PHP. I need to find functions matching functions that will allow this. ...

MDE Access decrypt JDBC

I want to perform JDBC SQL queries on a MDE Access file. I've set up the data source ODBC and everything worked well for a MDE file. Now, I'm working with a newer version of the MDE file, and here is the result: java.sql.SQLException: [Microsoft][Driver ODBC Microsoft Access] Cannont read record. Read authorization unavailable for "tbl...

Which codec + encryption method makes it easy for streaming J2ME video playback?

I want to transport video files from a desktop system to my mobile device, but I want the videos to be encrypted so the mobile video files cannot be viewed elsewhere. This means I can't decrypt the whole file, I need to decrypt it as a stream. Question: What's the best codec and encryption method to use to make the decryption easier? ...

BouncyCastle Last Byte Decrypt Problem

I am decrypting an XML file from the file system using Bouncy Castle. I output the decrypted text and get a fatal error SAXParseException on the very last byte of data. Below is my decryption method and the setup of the cipher object. I was initially using cipher streams, and everything worked perfect (commented out code was my stream)...

Decrypt (only) connection string section in Winforms app.config

Ok, I know this has been asked a thousand times before, but no conclusive solution has been derived...so here is another really silly question! I have a Winforms 3.5 app and using LINQ to SQL, hence the Connection string is ALWAYS stored in "app.config" by default (and VS2008 will not accept any other way of storing this - Ive even trie...

RSA decrypt with Java

I am trying to decrypt a string with RSA. It was encrypted in C# on the iPhone and I have the private key. This seems like a silly problem, but all of the examples I have seen show generating the private key. I have the private key (it is a byte[] of hex). It using PKCS#1 padding. The part I cannot figure out how to do is create a ja...

Excel password removal

We receive Excel workbook files every day which are password protected with the same password. We know this password. Is there a utility or method to remove password protection on these workbook files without invoking Excel.exe or the Excel object. Our goal is to take Excel out of the process and utilize SpreadsheetGear in VB.net. Ho...

Best way to use PHP to encrypt and decrypt?

I plan to store foreign account information for my users on my website, aka rapidshare username and passwords, etc... I want to keep information secure, but i know that if i md5 their information, i can't retrieve it later to use. Base64 is decrypt-able so theres no point using that just plain off. My idea is to scramble the user and ...

Encrypt in PHP not working as expected...

Hi, I have a very silly situation, i am receiving an encrypted string from VB.NET in PHP. I am able to decrypt the key. But when i want to encrypt the result and get the encrtypted string i get a mismatch. Can anyone help me out please.... Below is the PHP CODE. <?php //$syscode=$_REQUEST['syscode']; //The actual string is "blueberr...

How to decrypt an encrypted Apple iTunes iPhone backup?

I've been asked by a number of unfortunate iPhone users to help them restore data from their iTunes backups. This is easy when they are unencrypted, but not when they are encrypted, whether or not the password is known. As such, I'm trying to figure out the encryption scheme used on mddata and mdinfo files when encrypted. I have no prob...

How can I use externally generated keys to encrypt and decrypt the data in iPhone?

I am working on an application, in which I need to encrypt and decrypt the data, with the keys generated by server. I viewed the sample code of Crypto Exercise. In that keys are automatically generated. How can I use externally generated keys in the code? Please help. ...

Anyway to decrypt an encrypted sql server stored procedure?

Hi There, I have a couple of ms sql server (2000) stored procedures encrypted by ex-employee long time ago and things were okay until we need to change it a bit.... is there any way at all to retrieve the source? Or rewrite is the only option? Thanks a lot. ...

Decoding eval gzinflate base64_decode (Anyone Know of a Decoder I could Use for This)

I want to make sure that this code is not harmful but everytime I try to decode it it doesn't actually do anything but give me even crazier looking symbols. Any suggestions would be helpful. Below is the actual encrypted code... eval(gzinflate(str_rot13(base64_decode('FZnHDoRVElF/cmE7Kw5rpx3tCO+95zLCe3Uaz9diL9cCFVZSc7wQf//3r7//qM55...

How do I decrypt a file with Crypto++ that was encrypted with C#

Hi all, I would like to decrypt a file that I previously encrypted with C# using the TripleDESCryptoServiceProvider. Here's my code for encrypting: private static void EncryptData(MemoryStream streamToEncrypt) { // initialize the encryption algorithm TripleDES algorithm = new TripleDESCryptoServiceProvider(); ...

Cannot decrypt data with C# that was encrypted using PHP (Rijdael-128)

I decrypt data using PHP with this code: $content="1234"; $cp = mcrypt_module_open('rijndael-128', '', 'cbc', ''); $iv = mcrypt_create_iv(16, MCRYPT_RAND); $key = pack("H*",md5('a')); mcrypt_generic_init($cp, $key, $iv); $encrypted = mcrypt_generic($cp, $content); echo base64_encode($key)."\n"; echo base64_encode($iv)."\n"; echo base64_...

How to Protect Sensible Passwords stored in a Database

I'm developing a web application for which final users have to create an account. This part is very easy: I'll hash their passwords with SHA-256 so that nobody, except the user himself, knows the password. Now comes the difficult part. After the user creates an account, he/she has to provide the password of his/her email server. Now the ...