简体   繁体   中英

Encrypt and garble audio file using JAVA

I'm currently working on a project to encrypt MP3 audio using JAVA and produce garbled sound from that encrypted MP3 file. So far, I can encrypt the whole MP3 file using DES encryption method. However, this encrypted file is not playable using MP3 player. I know that MP3 file has some structure (header and data, etc), but I have no idea to implement encryption on this file without breaking the whole MP3 structure.

How to make this encrypted MP3 file playable?

Some more info about parsing and mp3 stream in java: JavaLayer is an mp3 decoder that naturally implements stream processing mostly with javazoom.jl.decoder.Bitstream class. It will skip all tag data and give you raw bytes for each frame.

Another library that does some mp3 stream parsing is jaudiotagger , maybe you can scavenge some code from there too.

Both of these libraries are distributed under LGPL, so just be aware of licensing issues.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM