I am working on a Java function which is expected to return a protected Excel file (xlsx) in byte array. I found a solution which used the Encryption support of Apache POI: How to Protect Excel Workbook Via SXSSF? However, OutputStream cannot be cast into ByteArrayOutputStream. I tried to find a way to convert the OutputStream into ByteArray but all
Tag: encryption
java: incompatible types: T cannot be converted to java.lang.String
I am currently working on a encryption and decryption service for my application, using Google Tink. The problem is the following: I want to program it without using (nearly) duplicate code and therefore I had the idea of using generics. If parsing the Strings to a byte[] is the only option I will be doing that, but I’d rather not.
best way to store aes encrypted data
What is the best/secure/easy to implement way to (locally) store data which has been encrypted using AES encryption? There doesn’t seem to be a proper guide or standard way to store the data, but after looking at some projects that use AES encryption, these seem to be the formats that come most: XML Text files csv for csv – the
Bouncy Castle Java PGP encryption & decryption
I am trying to implement PGP encryption in Java using Bouncy Castle, also using some of the examples provided by them. But if I try and decrypt the message I just encrypted, it does not work. The keys and the decryption method seem to be ok, because I can encrypt using an external tool (link) and then successfully decrypt it
Postfix and OpenJDK 11: “No appropriate protocol (protocol is disabled or cipher suites are inappropriate)”
I know there are some other questions (with answers) to this topic. But none of these was helpful for me. I have a Postfix server (postfix 3.4.14 on Debian 10 (Buster)) with the following configuration (only the interesting section): If I check the configuration with OpenSSL, I get (please note that I have made the domain name unrecognizable with “xxxxxx.de”):
Decrypt Java AES/CBC/PKCS5Padding with CryptoJS
I have some problem decrypting text with CryptoJS that has been encrypted with Java. The decryption should be done with AES/CBC/PKCS5Padding. The encrypted string is base64 encoded and I decode it before trying to decrypt the string. This is how the Java code looks like: And this is how I attempt to decrypt it in CryptoJS. SharedSecretKey is both the
How to use x509 public key to verify a signed/hashed Alexa request body?
I’m trying to work through the steps listed here for an Alexa Skill I’m developing in Java. I’m getting a request from Alexa which is a POST. Two of the headers are the signing certificate chain url and the signature. Amazon SHA1 hashes then signs the entire body of the Alexa request with an X509 key, and then base64 encodes
cannot decrypt String from text file [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 2 years ago. Improve this question In my journey to mastering Java, I started doing some AES encryption and
Send Data between client and server as a byte array
I am trying to send encrypted data between a client and server. Due to the RSA encryption its in Byte array form. This means I have had to change the way I send data. I curently cant get it working, Ill leave my method (sendMessage) below which is what handles the sending of the message, If anyone could tell me
Encryption/Decryption with bouncycastle-java and RSAES-OAEP
I am not an expert with encryption, but i am trying to create an CMSEnvelopedDataGenerator with bouncycastle 1.67, where the session key is encrypted with RSAES-OAEP (1.2.840.113549.1.1.7) For now my code looks like this: It runs through but when i check it via openssl asn1parse, i see and then the hex dump. On my reference file it is like: On