encryption

What Java library should I use for cryptography?

Basically I want to be able to encrypt and decrypt with AES 256. What is the industry standard library for encryption in Java? Something that has been around a long time and is tried and true. ...

openssl versus windows capi

Which is better to use openssl or windows capi for ecnryption issues what is the pro and con list for both. and if it possible to write my encryptor program on openssl and decrypt it with windows capi with no problem or there are some problem with this. ...

Querying and ordering results of a database in grails using transient fields

I'm trying to display paged data out of a grails domain object. For example: I have a domain object Employee with the properties firstName and lastName which are transient, and when invoking their setter/getter methods they encrypt/decrypt the data. The data is saved in the database in encrypted binary format, thus not sortable by those ...

How to decrypt a string encrypted with HMACSHA1?

I'm an encryption novice trying to pass some values back and forth between systems. I can encrypt the value, but can't seem to figure out how to decrypt on the other end. I've created a simple Windows Forms application using VB.NET. Trying to input a value and a key, encrypt and then decrypt to get the original value. Here's my code ...

Java Bouncy Castle Cryptography - Encrypt with AES.

How do I AES encrypt with the java bouncy castle library? Example code or a link to example code would be nice :) ...

AES Encryption library

Is there a library or something that will allow me to simply call a function that will AES encrypt a byte array? I don't want to deal with multiple update blocks/transformFinal/etc, because there is a possibility I will mess up... ...

Anyone know about Jasypt (Java encryption library)?

From googling I found Jasypt, I'm wondering is it reliable? Anyone know about it? ...

Converting a md5 hash byte array to a string

How can I convert the hashed result, which a byte array, to a string? byte[] bytePassword = Encoding.UTF8.GetBytes(password); using (MD5 md5 = MD5.Create()) { byte[] byteHashedPassword = md5.ComputeHash(bytePassword); } So I need to convert byteHashedPassword to a string ...

javax.crypto AES encryption - Do I only need to call doFinal?

I want to do AES CBC encryption in Java. I'm using javax.crypto. After I have the Cipher initialized, do I only need to call doFinal on the clear bytes to properly encrypt it? Or do I need to do something with update? Documentation says update: Continues a multiple-part encryption or decryption operation and doFinal Encry...

How does the receiver of a cipher text know the IV used for encryption?

If a random IV is used in encrypting plain text, how does the receiver of the cipher text know what the IV is in order to decrypt it? This is a follow-up question to a response to the previous stackoverflow question on IVs here. The IV allows for plaintext to be encrypted such that the encrypted text is harder to decrypt for an att...

Basic question about encryption - what exactly are keys?

Hi, I was browsing and found good articles about encryption. However, none of them described why the key lenght is important and what exactly the key is used for. My guess is that could work this way: 0101001101010101010 Key: 01010010101010010101 //the longer the key, the longer unique sequence XOR or smth: //re...

C# CF: file encryption/decryption on the fly

Hi, i've seen many article on encrypt/decrypt of file and typically a button is used to choose the file for encrypt and another button to decrypt the file. i've seen some application like truecrypt and probably others which does file encryption on-the-fly with transparent. this means that when a encrypted file is clicked to access, it w...

Write Secure Cocoa Code

Hello, Im making an application in cocoa and wanted to see if some strings in it were easily accessible so I ran OTX on it and sadly all of my code was found. Is there a method I can use to make my code more "secure" or at least encrypt/hide the strings? The reason I want to encrypt the string is it's a password for a server. I don'd ne...

How to encrypt/decrypt a file in Java?

Hello, I am writing a Java application which can "encrypt" and consequently "decrypt" whatever binary file. I am just a beginner in the "cryptography" area so I would like to write a very simple application for the beginning. For reading the original file, I would probably use the java.io.FileInputStream class to get the "array of b...

encryption decryption function in php

import gnupg, urllib retk = urllib.urlopen("http://keyserver.pramberger.at/pks/" "lookup?op=get&search=userid for the key is required") pub_key = retk.read() #print pub_key gpg = gnupg.GPG(gnupghome="/tmp/foldername", verbose=True) print "Import the Key :", gpg.import_keys(pub_key).summary() print "Encrypt the Message:" msg = "Helllllll...

I need to encrypt the names of my http form elements

I have a form with certain elements, input boxes, check boxes etc. I need to encrypt the names of these input boxes and check boxes. I'm currently using a Rijndael encryption/decryption method through c# however this is making the encrypted names too long to be passed in a post. Is there a better way to get decent encrypted names? my pur...

Can someone explain C# CngKey.Create please?

The internet resources seem few and far between and the best MSDN page (as far as I could tell) throws an error! Specifically, I'm not sure what to create as a CngKeyCreationParameters object... Thanks, Matt. ...

Crypted passwords in PHP-apis? Twitter?

Hello I'm creating a small service using api-libraries, such as Twitter. Is it possible to input users password to Twitter-api crypted. I would not like to store peoples passwords uncrypted on my server, but writing them every time is annoying. Does someone know? Martti Laine ...

Converting a int to a BCD byte array

I want to convert an int to a byte[2] array using BCD. The int in question will come from DateTime representing the Year and must be converted to two bytes. Is there any pre-made function that does this or can you give me a simple way of doing this? example: int year = 2010 would output: byte[2]{0x20, 0x10}; ...

AES Two Way Encryption with Salting

I am using the following class written by Mark Brittingham for two way AES encryption in my application. How would I go about modifying it to add a salt string? using System; using System.Data; using System.Security.Cryptography; using System.IO; public class SimpleAES { // Change these keys private byte[] Key = { 123, 217, 19...