Sumanth Varada

Java

Dedicated to the discussion of the Java programming language a...
Jul 16, 2019 19:32
Criteria.where("primaryMobileNum").is(phoneNumber)
Jul 16, 2019 19:32
Criteria.where("primaryMobileNum").in(phoneNumbers)
Jul 16, 2019 19:31
I have tried with following but not working
Jul 16, 2019 19:31
I want this search to be on numeric value column
Jul 16, 2019 19:30
I want to do a search operation using criteria in spring data jpa
Jul 16, 2019 19:30
Hi Guys
Feb 12, 2019 17:12
My input string and encrypted string both are same here
Feb 12, 2019 17:12
How come an encryption algirithm can return the same string as an encrypted string
Feb 12, 2019 17:11
Not able to reproduce the issue
Feb 12, 2019 16:57
Hi Guys
 

Trash

Chat Dustbin (Ignore kar Ignore)
Feb 12, 2019 17:02
public static String encryptWithAES256(String strToEncrypt) throws Exception
{
MessageDigest digest = MessageDigest.getInstance("SHA-256");
byte[] encodedhash = digest.digest(KEY.getBytes(StandardCharsets.UTF_8));
IvParameterSpec ivspec = new IvParameterSpec(Arrays.copyOf(KEY.getBytes(),16));
SecretKeySpec secretKey = new SecretKeySpec(encodedhash, AES_ENCRYPTION_ALGORITHM);
Cipher cipher = Cipher.getInstance(CIPHER_TRANSFORMATION);
cipher.init(Cipher.ENCRYPT_MODE, secretKey, ivspec);
return new String(Base64.encodeBase64(cipher.doFinal(strToEncrypt.getBytes(CHARACTER_ENCODING))));
Feb 12, 2019 17:00
AES 256 Encryption is getting failed for few strings. didn't understand how ?
Feb 12, 2019 16:58
Im facing an issue while encrypting the single char string in application. I can able to do it when i tried to do it with main method
Feb 12, 2019 16:57
0
Q: Few strings are failed to encrypt using AES256 in Java

Sumanth VaradaThis specific case is coming whenever i tried to encrypt single char strings in application. When i tried to encrypt the same string with main method then i was able to encrypt it. But when i run with the application then this specific issue is coming. I felt this is strange because it is working...