Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8609369
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T03:52:07+00:00 2026-06-12T03:52:07+00:00

I have an encrypted MP3 file. The file was encrypted using the following openssl

  • 0

I have an encrypted MP3 file. The file was encrypted using the following openssl method

openssl enc -e -aes-128-cbc -K 00ff349830193845af43984758690213 -p -iv 0 -nosalt -in  input.mp3 -out output.mp3

Then I’m trying decrypt the file in my ios application as follows,

NSString *resourceDocPath = [[NSString alloc] initWithString:[[NSBundle mainBundle] bundlePath]] ;
NSString *filePath = [resourceDocPath stringByAppendingPathComponent:@"output.mp3"];
NSData *key = [@"00ff349830193845af43984758690213" dataUsingEncoding:NSUTF8StringEncoding];
NSData *iv = [@"00000000000000000000000000000000" dataUsingEncoding:NSUTF8StringEncoding];
NSData *fileData = [[NSData alloc] initWithContentsOfFile:filePath];
NSData *decryptData;

CCCryptorStatus ccStatus   = kCCSuccess;
size_t          cryptBytes = 0;    // Number of bytes moved to buffer.
NSMutableData  *dataOut    = [NSMutableData dataWithLength:fileData.length + kCCBlockSizeAES128];

ccStatus = CCCrypt(kCCDecrypt,
                   kCCAlgorithmAES128,
                   kSecPaddingNone,
                   key.bytes,
                   kCCKeySizeAES128,
                   iv.bytes,
                   fileData.bytes,
                   fileData.length,
                   dataOut.mutableBytes,
                   dataOut.length,
                   &cryptBytes);

if (ccStatus != kCCSuccess) {
    NSLog(@"CCCrypt status: %d", ccStatus);
}    
dataOut.length = cryptBytes;
decryptData = dataOut;

NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *appFile = [documentsDirectory stringByAppendingPathComponent:@"MyDECFile.mp3"];
[decrypt writeToFile:appFile atomically:YES];
NSLog(@"%@",documentsDirectory);

Now I have the decrypted MP3 file in document directory, But its not playing and literally its a junk output. Please suggest me a way to get the desired output.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T03:52:08+00:00Added an answer on June 12, 2026 at 3:52 am

    I have used https://github.com/rnapier/RNCryptor for decryption.

    #import "ViewController.h"
    #import <Security/Security.h>
    #import <MediaPlayer/MediaPlayer.h>
    #import "RNEncryptor.h"
    #import "RNDecryptor.h"
    #import "RNOpenSSLEncryptor.h"
    #import "RNOpenSSLDecryptor.h"
    
    NSString *resourceDocPath = [[NSString alloc] initWithString:[[NSBundle mainBundle] bundlePath]] ;
    NSString *filePath1 = [resourceDocPath stringByAppendingPathComponent:@"output.mp3"]; //The encrypted mp3 file (with aPassword)
    NSData *passEncryptedData =[[NSData alloc] initWithContentsOfFile:filePath1]; 
    NSError *error;   
    NSString *pass = @"aPassword";    
    NSData *dataDecrypted = [RNOpenSSLDecryptor decryptData:passEncryptedData 
                                               withSettings:kRNCryptorAES256Settings
                                                   password:pass
                                                      error:&error];
    
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString *appFile = [documentsDirectory stringByAppendingPathComponent:@"passDecryptFile.mp3"]; //The Decrypted file saved here
    [dataDecrypted writeToFile:appFile atomically:YES];
    NSLog(@"%@",documentsDirectory);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an aes encrypted mp3 file that I need to play in iOS;
I have a file encrypted with java application using AES. I also have a
If I have an encrypted file that is encrypted with AES CBC, would changing
I have encrypted every item in MS Access file using AES. Encryption works great.
I have AES encrypted data stored in the database using php mysql. Which I
Short question: I have encrypted a string with AES-256 with the openssl commandline tool.
If I have the encrypted RAR file, and I also have the unencrypted file,
Let's say I have an encrypted file on an iPhone and every time I
I have a pgp-encrypted file that I need to extract data from at runtime.
I have an encrypted word/excel/pdf file locally stored which I need to preview in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.