encryption

Signup or Invitation Email Verification w/o Database

I'd like to keep my database clean of stale almost-accounts, and I was thinking about making new signups and invitations put their data into the welcome email as an encrypted or hashed url. Once the link in the url is visited, the information is then added into the database as an account. Is there something that currently does this? Any ...

How do I translate this SHA function in Java to an equivalent in Ruby?

I have this algorithm in Java to store passwords in database. I'd like to re-write my application in Ruby on Rails, so I need the same algorithm to compare hashed passwords. What's the Ruby equivalent of this algorithm? public static String encrypt(String password) { MessageDigest md; try { md = MessageDigest.getInstance("SHA"); m...

iPhone --- 3DES Encryption returns "wrong" results?

Hello fellow developers, I have some serious trouble with a CommonCrypto function. There are two existing applications for BlackBerry and Windows Mobile, both use Triple-DES encryption with ECB mode for data exchange. On either the encrypted results are the same. Now I want to implent the 3DES encryption into our iPhone application, so...

Two-way encryption in PHP

My application (obviously) uses a unique ID to distinguish records. This UID is passed in URLs (e.g. ./examplepage.php?UID=$example_int), among other things. While I obviously have server-side validation in place to make sure clients don't access other clients' data, is there a two-way encryption method I can use in PHP to only pass en...

Unspecified error when encrypting data with C#.NET RSA

Hello :) I have no idea how to describe my problem. It is the simplest way to encrypt a byte array, and I literally get "Unspecified Error" at the .Encrypt(...) method. byte[] cleartext = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0...

How to make RSACryptoServiceProvider work without padding (nopadding)?

Hello :) I need to make a C# application compatible with a Java application. The Java application uses a Cipher.getInstance("RSA/ECB/nopadding"); initializer to make the cipher ECB and no-padding. However, in C#, you have 2 options for padding: OAEP padding or PKCS#1 v1.5 padding. I need a no-padding version, or else I'm definitely s...

Encrypting with RSA private key in Java

I'm trying to encrypt some content with an RSA private key. I'm following this example: http://www.junkheap.net/content/public_key_encryption_java but converting it to use private keys rather than public. Following that example, I think what I need to do is: Read in a DER-format private key Generate a PCKS8EncodedKeySpec call gener...

Encrypting passwords in WinForms app.config, .NET.

I want to store a password in a config file but i would like it to be encrypted so that in the app it can be read, decrypted and used. What's the best way to encrypt a password like this? Edit: I want to encrypt only password, not whole config, or whole section. ...

Convert VB6 Randomize to C#

I'm writing a C# frontend to a legacy database that uses VB6 Rnd() and Randomize() methods for user password encryption. The encryption function is very simplistic and really not all that secure, but it's what all current passwords are stored with. What I'd like to be able to do is authenticate legacy users from a C# application. I ca...

How to use GNUPG and Crypt_GPG

Hiya, I'm trying to use GNUPG and Crypt_GPG to encrypt data ready to be sent across email to a client server but i'm having problems setting it up. I've installed GNUPG on the server, and it works just fine, located in /home/myserver/.gnupg I've installed Crypt_GPG into /home/myserver/php/Crypt and edited the various files to have ab...

Encryption algorithm that output byte by byte based on password and offset

Is there a well-known (to be considered) algorithm that can encrypt/decrypt any arbitrary byte inside the file based on the password entered and the offset inside the file. (Databyte, Offset, Password) => EncryptedByte (EncryptedByte, Offset, Password) => DataByte And is there some fundamental weakness in this approach or it's still ...

AES Encryption for an NSString on the iPhone

Can anybody point me in the right direction to be able to encrypt a string, returning another string with the encrypted data? (I've been trying with AES256 encryption.) I want to write a method which takes two NSString instances, one being the message to encrypt and the other being a 'passcode' to encrypt it with - I suspect I'd have to ...

.NET TripleDESCryptoServiceProvider equivalent in Java

Hello nice people, Please, just don't ask me why. I just have this code in .NET that encrypt/decrypt strings of data. I need now to make 'exactly' the same funcionality in java. I have tried several examples for DESede crypt, but none of them gives the same results as this class in .net. I even though on making a .net webserbvice behi...

Securing PHP files

Hello and thanks to everyone for reading my question. I've been working on a PHP web program for a little while and was wondering what measures should I take to protect the source before putting it on a live server. The source isn't being distributed, it's being accessed through a website (users log into the website to use it). First...

Encryption library for Delphi

I'm looking for a free and up to date encryption library for Delphi 2010 that implements RSA and AES (Rijndael). I want a free library because I plan to write and publish some sample code that will use it. A Delphi 2010 version of TurboPower LockBox has been posted to the SongBeamer site, that implements both of these, but I'm concerne...

Derivation of IV for CBC Chaining Mode

Is there any secure way of deriving the value of IV for use in CBC mode (e.g. 3DES CBC) aside from randomizing the IV? ...

simple symmetric encryption of long to String (and back) in java

Hi, I'm looking for a simple way to translate long to String and back in a way that will "hide" the long value. I'd prefer to avoid adding another .jar to the project for this feature. It does not have to be a hard-to-crack encryption, just to look random to the inexperienced eye. Addition: My purpose here is to attach a counter val...

How can you make a PHP application require a key to work?

About 4 years ago I used a php product called amember pro, it is a membership script which has plugins for lie 30 different payment processors, it was an easy way to set up an automated membership site where users would pay a payment and get access to a certain area. The script used ioncube http://www.ioncube.com/sa_encoder.php to pre...

c# file container

Hello! I am searching for a way to add several files into one file, much like a Zip file. I need to be able to create a file container on the fly and add several word documents, images and other important files into the container. My criteria is that you don't need to install any additional software on the computer (preferebly only a .D...

Suggestions on storing passwords in database

Here's the situation - its a bit different from the other database/password questions on StackOverflow.com I've got two sets of users. One are the "primary" users. The others are the "secondary" users. Every one has a login/password to my site (say mysite.com - that isn't important). Background: Primary users have access to a third sit...