encryption

best encryption method

What is the most standard encryption technique used in sql server for asp.net c# enterprise level application? . i am talking with respect to standards like md5 or sh1 etc, hashing ...

Cakephp - how to encrypt and then decrypt data that is being stored and retrieved from the database.

Err.... like the question says. How do I go about encrypting and then decrypting data that is being stored and retrieved from the database. By the way it's not just for storing a password which has been md5ed, I need to retrieve the data too. Thanks! ...

Smart command line encryption method for app.config sections searched

ASP.NET contains a simple method to encrypt sections of web.config files. It is simple to do this by code and it is simple to do this by command line with the aspnet_regiis tool for web.config files. And although the underlying API isn’t ASP.NET specific, there is no tool like aspnet_regiis for app.config files. I am aware of the workaro...

Translate from Java to C#: simple code to re-encode a string

We were sent this formula to encrypt a string written in Java: String myInput = "test1234"; MessageDigest md = MessageDigest.getInstance("SHA"); byte[] myD = md.digest(myInput.getBytes()); BASE64Encoder en64 = new BASE64Encoder(); String myOutput = new String ( Java.net.URLEnc...

REST authentication S3 like hmac sha1 signature vs symetric data encryption.

Hello stackers, I was arguing about an S3 like aproach using authorization hash with a secret key as the seed and some data on the request as the message signed with hmac sha1 (Amazon S3 way) vs an other developer supporting symetric encryption of the data with a secret key known by the emiter and the server. What are the advantage of...

Encrypt URL in asp.net

Hi All, My site is in asp.net 3.5 and C#. I am sending link to my user through mail, now I want to send each user a specific URL. so instead of sending the clear text I want to send link with encrypted string URL, which I will decrypt on my home page. Like instead of www.mysite.aspx\mypage?userId=12 i'll send www.mysite.aspx\mypage?User...

php encrypting an integer to get only alphanumeric characters?

When I use some of php's encryption functions, I end up getting a few characters I don't want (+, /, =). The problem is that my application doesn't allow these in the url. I'm wondering if there's a good way of encrypting an integer and having only alphanumeric characters in the result? I'm trying to pass some data through the url. I kno...

File encyption with Python

Is there a way to encrypt files (.zip, .doc, .exe, ... any type of file) with Python? I've looked at a bunch of crypto libraries for Python including pycrypto and ezpycrypto but as far as I see they only offer string encryption. ...

How to decrypt a string in C# that was encrypted in Delphi

Hi all, we have a project written in Delphi that we want to convert to C#. Problem is that we have some passwords and settings that are encrypted and written into the registry. When we need a specified password we get it from the registry and decrypt it so we can use it. For the conversion into C# we have to do it the same way so that th...

Encryption: TCB (Tweaked CodeBook) algorithm - what is it?

Can someone please provide a description of TCB algorithm? ...

Easiest way to sign/certify text file in C++?

I want to verify if the text log files created by my program being run at my customer's site have been tampered with. How do you suggest I go about doing this? I searched a bunch here and google but couldn't find my answer. Thanks! Edit: After reading all the suggestions so far here are my thoughts. I want to keep it simple, and since...

Algorithm Complexity: MD5 or SHA1

Which is the best overall hash algorithm. md5 or sha1. From what I know md5 is faster that sha1 but SHA1 is more complex than md5. I am missing anything ...

Ideas for multiplatform encrypted java mobile storage system

Hi I have some questions (read Doubts part) regarding implementing encrypted storage (kind of encrypted filesystem) on Android, Blackberry and J2ME. I need your advice, you cryptography masters. I know this question is a bit long a maybe too verbose, but please try to read it till the end (I have so many related questions that I couldn'...

Why the generated key size is not constant?

The following code prints randomly 634, 635, 636, each time I run it. Why its not constant? public static void main(String[] args) throws Exception { KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("RSA", "BC"); keyPairGen.initialize(1024); RsaKeyPair keyPair = new RsaKeyPair(keyPairGen.generateKeyPair()); Sys...

Is PKCS#1 V2.0 implemented for Java?

I need encrypt data using exactly the PKCS#1 V2.0 encryption method (defined in item 7.2.1 of the PKCS#1V2 specification). Is it already implemented for Java? I'm thinking in something like just pass a parameter to javax.crypto.Cipher specifying "PKCS#1V2", I wonder if there is something like this? ...

Is directly linking to an image okay for images uploaded to the server with a custom PHP script?

For an image file (JPEG) that has been uploaded to the server via a PHP script (to a directory such as http://www.somedomain.com/images, is it a good idea to allow the client to get the image's direct address (such as http://www.somedomain.com/images/someimage.jpg and paste it into a WYWSIWYG text editor (such as TinyMCE)? I am wonderin...

Creating a small encrypted string in PHP

I am looking to create a small encrypted string, like the referral strings used by Twitpic or bit.ly, for a website I am working on for referral purposes. Any of the built-in functions like MD5 and mcrypt each make strings that are too long for my purposes. Is there an easy way to create a string like this? Thanks. ...

convert password encryption from java to php

I'm trying to create a PHP version of an existing JSP program, however I'm stuck at the password encryption part. Could you please tell me how to convert this one? I know it tries to get the md5() but after that, I don't get it. I get lost in the Stringbuffer and for() parts. Can you help me out? public static String encryptPassword(...

What are the PHP "encryption" functions?

Looking for built in encryption functions, not to hide the string from the clever programmer, but instead just to obfuscate it a bit. Looking for functions such as str_rot13 and base64_encode, but I can't seem to locate any. Surely there are more? ...

Encrypting and decrypting strings

Does anyone know of a good way to encrypt and decrypt strings using VB6 to ensure sensitive data is secure? Also, is there an encryption method that can be shared between VB6 and .NET? Example: The encrypted string will be written to a database using a VB6 application, but the value also need to be read an decrypted in a c# .net appl...