Skip to content
Advertisement

Tag: encryption

Java encryption with sha256 and salt

I need a little help from you, I have an exercise , to do a login program and to store the password with sha-256 and salt, I made a part, but here it’s the hard part. I’ve read that if you use sha-256 that you can’t reverse the operation to determine the password. If it’s true then what I need

No Java folder located in Library despite JDK installation

Currently running OSX El Capitan on a recently set up computer. I’m trying to set up Java’s unlimited crypto policy which requires me to modify some files within my current jre, but I can’t find the Java folder that is supposed to be located within Library. I’ve run /usr/libexec/java_home which shows me /Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home however within my Library folder, there is

Encrypt password fields in mongodb

I have following code, it insert the userName and password into database but the password is stored in plain text format. I mean when I’ll look into the db I can see the inserted password. I want to store password in encrypted format How can I achieve this? Answer According to the conversation in the comments, what you mean is

null pointer Exception after writeObject to OutputStream

This is code for a basic chat server. The user is asked to enter a username and password on the Chat_Client, which is then encrypted using EncryptedMessage’s encrypt method and sent to the Chat_Server via the ClientOutputStream using writeObject. When code line clientOutputStream.writeObject(uname) is run it is returning a nullPointerException. I am able to output the encrypted username before this

Calculation of Diffie–Hellman public key slow

hi i’m trying to implement a Diffie–Hellman key exchange but the calculation for 100000 already takes several seconds. I won’t know hoch much time it would take for a 256bit number. Is it so slow because of the implementation of BigInteger or am i off the track? Answer the problem is that g.pow(secret) is a really, really, REALLY big number.

Seeking in AES-CTR-encrypted input

As AES in CTR mode is great for random access, lets say I have a data source created with a CipherOutputStream in AES-CTR mode. The library underneath—which is not mine—uses a RandomAccessFile that allows to seek to a specific byte offset in the file. My initial thought would be to use a CipherInputStream with a Cipher initialized with the right

C# and Java DES Encryption value are not identical

I am trying to encrypt the same data using C# and Java. If the data is more than 7 bytes then Java and C#’s encrypted value are not identical. Input 1: a java output: FrOzOp/2Io8= C# output: FrOzOp/2Io8= Input 2: abc j : H9A/ahl8K7I= c#: H9A/ahl8K7I= Input 3: aaaaaaaa (Problem) j : Gxl7e0aWPd7j6l7uIEuMxA== c#: Gxl7e0aWPd7sf1xR6hK4VQ== Here is the implementation of

Advertisement