Hello, I hope not to scare you with this long post. I'm testing [Solr](https://lucene.apache.org/solr/) (read solar) and it works fine. I have an issue with the **DataImport** handler, it's set to get data from a MariaDB database, which works fine if I save the database credentials in plain text in the **data-config.xml** file for the Solr core: <dataSource type="JdbcDataSource" driver="org.mariadb.jdbc.Driver" url="jdbc:mariadb://localhost:3306/DB_TO_QUERY_HERE" user="USER" password="PASSWORD"/> Following the documentation at: * https://lucene.apache.org/solr/guide/7_0/uploading-structured-data-store-data-with-the-data-import-handler.html#configuring-the-dih-configuration-file I see I can encrypt the password, in order to do so I have to change the above configuration to this: <dataSource type="JdbcDataSource" driver="org.mariadb.jdbc.Driver" url="jdbc:mariadb://localhost:3306/DB_TO_QUERY_HERE" user="USER" password="ENCRYPTED_PASSWORD" encryptKeyFile="/absolute/path/to/key.txt"/> And run a …

Member Avatar
Member Avatar
+0 forum 4

Hello. I'm working on a project that requires some data to be encrypted with AES 128. My encryption works fine but when I decrypt I get an `Exception in thread "main" javax.crypto.IllegalBlockSizeException: Input length not multiple of 16 bytes` exception. Code: import javax.crypto.Cipher; import javax.crypto.spec.SecretKeySpec; public class AESCipher { private final String INCORRECT_PASSWORD_LENGTH = "The password provided must be a length of " + "16 bytes."; private String password; private SecretKeySpec key; private Cipher cipher; /** * Generate the key from the password. */ private void generateKey() throws Exception { key = new SecretKeySpec(this.password.getBytes(), "AES"); cipher = Cipher.getInstance("AES/CBC/NoPadding"); } /** …

Member Avatar
Member Avatar
+0 forum 1

Hi I got this error ImportError: No module named Crypto.Cipher Where can I find the module for windows and debian linux? How can I fix error both in windows and Linux? importerror no module named crypto.cipher windows Traceback (most recent call last): File "C:\Users\Win/\Desktop\client.py", line 2, in <module> from Crypto.Cipher import AES ImportError: No module named Crypto.Cipher >>> Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win 32 Type "help", "copyright", "credits" or "license" for more information. >>> from Crypto.Cipher import AES Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No …

Member Avatar
Member Avatar
+0 forum 2

I need some help to make AES work with UDP. I keep getting this error. Exception in thread "main" javax.crypto.IllegalBlockSizeException: Input length must be multiple of 16 when decrypting with padded cipher at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:750) at com.sun.crypto.provider.CipherCore.doFinal(CipherCore.java:676) at com.sun.crypto.provider.AESCipher.engineDoFinal(AESCipher.java:313) at javax.crypto.Cipher.doFinal(Cipher.java:2087) at AES.decrypt(AES.java:31) at EchoServer.main(EchoServer.java:26) It seems that upon receiving the UDP AES encrypted message from client, it has problem decrypting due to the byte[] which is being received from UDP transmission. I have also no idea whether am I doing it the right way. What I mean is that, is there any way which I can do to ensure that …

Member Avatar
+0 forum 0

Hi I am trying to make an java application to compress file and folders in .zip format.. i want to add additional functionality of adding password to a zip file,for this i want to use aes-256 algorithm but i am stuck with this,i can't figure it out. if i apply aes algorithm to file and add password where this password get stored??in the file crc or in some file data field, Do i need to use an API for this or else this could be done without api and by creating my own java program??

Member Avatar
Member Avatar
+0 forum 1

I want to encrypt my 128 bit string using AES encryption. example 128 bit string = "A#$RFDE%t^&jhy*i" with 128 bit key = "CDF$#%Tgfvb^%&$C" [url]http://www.cryptopp.com/[/url] Is here any help to encryption. I gone through crypto++ library. But it seem tough to understand.

Member Avatar
Member Avatar
+0 forum 1

hi everyone, I am writing a small client and server application in java which uses SSL sockets and AES, i got this from the net and edited it a bit is this correct and secure? client: [code=java]/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package sslaesclient; import java.io.*; import javax.net.ssl.*; import java.util.regex.*; public class Sslaesclient { public static void main(String[] args) { // Pick all AES algorithms of 256 bits key size String patternString = "AES.*256"; Pattern pattern = Pattern.compile(patternString); Matcher matcher; boolean matchFound; try { SSLSocketFactory sslFact = …

Member Avatar
Member Avatar
+1 forum 1

Hello people. Im having a problem in my coding. I am doing a username and password application (sumtthing like a password keeper). So I have created the interface and i integrated vb 2008 with sql server 2008. So the adding of account and password all went fine. I have applied aes 128 bits for the password. that means when the user enters a new record for example an email and he click save, the password will automatically be encrypted before it is saved in the database. now im having a problem where when i want to display the password in …

Member Avatar
Member Avatar
+0 forum 3

I was wondering on how many people would find this use full and would use it if it was in a more mature stage. [url]http://code.google.com/p/wordpress-aes/[/url] I have been working on integrating AES support into wordpress. I have mentioned it to the wp-hackers group and alot of them just don't see the need for it or don't understand it. I was wondering what others thoughts are?

Member Avatar
+0 forum 0

Hello, this is my first post on DaniWeb so I hope you'll go easy on me ,and my english.I'm working on a implementation of the AES algorithm in python;my app is supposed to encrypt the contents of files, and it does, yet it is kind of slow.I've optimized the code as good as I could because I am a beginner , but I would like to know if there is a way to reduce the amount of text , before I go through the encryption phase with it.I cannot use PyCrypto, nor OOP ( well I can only use OOP …

Member Avatar
Member Avatar
+0 forum 6

hi, i downloaded the existing twofish algorithm from bruce schiener's website but i am having trouble compiling it i.e making it run. can some one plz help me.

Member Avatar
Member Avatar
+0 forum 13

Hi guys, I'm looking for AES equivalent inverse cipher...Has any one worked on it.. I need a c code for it ... please it's really very urgent..

Member Avatar
Member Avatar
+0 forum 9

i have a simple question: I want to define a hex character array in C, but I don't want to have to define the elements one at a time. my programme needs an hexadecimal array as input of 128 bits. for example, [code=c]unsigned char temp2[32]= {0x00 ,0x11 ,0x22 ,0x33 ,0x44 ,0x55 ,0x66 ,0x77 ,0x88 ,0x99 ,0xaa ,0xbb ,0xcc ,0xdd ,0xee ,0xff};[/code] the variable temp2 values need to be assigned dynamically.. since i have another integer array of size 32.e.g. [code=c]paintext[32]={0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}[/code] which will be converted to hexadecimal and dynamically allocated to temp2 ___________________________________________________________________________________ I am exactly working on AES algorithm here …

Member Avatar
Member Avatar
+0 forum 3

Hi, why i can coding only 128 bytes text? Work: string plainText = "1234567890123456"; Don't work: string plainText = "12345678901234561"; Don't work: string plainText = "123456789012345"; [CODE="C#"] string plainText = "1234567890123456"; byte[] plainTextBytes = Encoding.UTF8.GetBytes(plainText); byte[] keyBytes = System.Text.Encoding.UTF8.GetBytes("1234567890123456"); byte[] initVectorBytes = System.Text.Encoding.UTF8.GetBytes("1234567890123456"); RijndaelManaged symmetricKey = new RijndaelManaged(); symmetricKey.Mode = CipherMode.CBC; symmetricKey.Padding = PaddingMode.Zeros; ICryptoTransform encryptor = symmetricKey.CreateDecryptor(keyBytes, initVectorBytes); MemoryStream memoryStream = new MemoryStream(); CryptoStream cryptoStream = new CryptoStream(memoryStream, encryptor, CryptoStreamMode.Write); cryptoStream.Write(plainTextBytes, 0, plainTextBytes.Length); cryptoStream.FlushFinalBlock(); byte[] cipherTextBytes = memoryStream.ToArray(); memoryStream.Close(); cryptoStream.Close(); string cipherText = Convert.ToBase64String(cipherTextBytes); Console.ReadLine(); [/CODE]

Member Avatar
Member Avatar
+0 forum 1

I have found a module pycrypto which has an AES encryption and decryption function, in commandline everything works fine both encryption and decryption, but if I want to implement it in my program, it fails =( [code=python]def aes(txt): global crypt message="".join(txt) #format the message which has to be encrypted/decrypted to a string c=0 plist="".join(pflist) while len(plist)<15: plist+="a" c+=1 #loop is to be sure the password has at least 16 characters. plist+=str(c) obj=AES.new(plist[:16], AES.MODE_ECB) if crypt == "en": c=0 while len(message)/16 != len(message)//16: message+="a" c+=1 #loop is to be sure the message is a multiple of 16 ciphertext=obj.encrypt(message) else: print message,len(message) …

Member Avatar
Member Avatar
+0 forum 11

The End.