안녕하세요, 사용자가 다양한 사운드를 구매할 수있는 앱 구매시 설정 중입니다. 일단 구입하면 그는 그 소리를 응용 프로그램에서 재생할 수 있습니다. 사운드 파일은 모두 Resources 폴더에 있으며, 구입 한 파일을 (plist로) 기록합니다. 아니요 IAP 파일을 마우스 오른쪽 버튼으로 클릭하고 해당 컨텐츠를 볼 수 있다면 리소스를 볼 수 있습니다. 따라서 실제로 아무 것도 구입하지 않고도 그 소리를들을 수 있습니다. 보호 번들 등이 있습니까?인앱 구매 리소스 보안
1
A
답변
1
해당 파일을 각각 암호화하고 구입할 때 해독하여 사용 가능하게 만들 수 있습니다.
.H :
#import <Foundation/Foundation.h>
@interface NSData (DataCategory)
- (NSData *)AES256EncryptWithKey:(NSString *)key;
- (NSData *)AES256DecryptWithKey:(NSString *)key;
@end
하는 .m
#import "NSDataCategory.h"
#import <CommonCrypto/CommonCryptor.h>
@implementation NSData (DataCategory)
- (NSData *)AES256EncryptWithKey:(NSString *)key {
// 'key' should be 32 bytes for AES256, will be null-padded otherwise
char keyPtr[kCCKeySizeAES256+1]; // room for terminator (unused)
bzero(keyPtr, sizeof(keyPtr)); // fill with zeroes (for padding)
// fetch key data
[key getCString:keyPtr maxLength:sizeof(keyPtr) encoding:NSUTF8StringEncoding];
NSUInteger dataLength = [self length];
//See the doc: For block ciphers, the output size will always be less than or
//equal to the input size plus the size of one block.
//That's why we need to add the size of one block here
size_t bufferSize = dataLength + kCCBlockSizeAES128;
void *buffer = malloc(bufferSize);
size_t numBytesEncrypted = 0;
CCCryptorStatus cryptStatus = CCCrypt(kCCEncrypt, kCCAlgorithmAES128, kCCOptionPKCS7Padding,
keyPtr, kCCKeySizeAES256,
NULL /* initialization vector (optional) */,
[self bytes], dataLength, /* input */
buffer, bufferSize, /* output */
&numBytesEncrypted);
if (cryptStatus == kCCSuccess) {
//the returned NSData takes ownership of the buffer and will free it on deallocation
return [NSData dataWithBytesNoCopy:buffer length:numBytesEncrypted];
}
free(buffer); //free the buffer;
return nil;
}
- (NSData *)AES256DecryptWithKey:(NSString *)key {
// 'key' should be 32 bytes for AES256, will be null-padded otherwise
char keyPtr[kCCKeySizeAES256+1]; // room for terminator (unused)
bzero(keyPtr, sizeof(keyPtr)); // fill with zeroes (for padding)
// fetch key data
[key getCString:keyPtr maxLength:sizeof(keyPtr) encoding:NSUTF8StringEncoding];
NSUInteger dataLength = [self length];
//See the doc: For block ciphers, the output size will always be less than or
//equal to the input size plus the size of one block.
//That's why we need to add the size of one block here
size_t bufferSize = dataLength + kCCBlockSizeAES128;
void *buffer = malloc(bufferSize);
size_t numBytesDecrypted = 0;
CCCryptorStatus cryptStatus = CCCrypt(kCCDecrypt, kCCAlgorithmAES128, kCCOptionPKCS7Padding,
keyPtr, kCCKeySizeAES256,
NULL /* initialization vector (optional) */,
[self bytes], dataLength, /* input */
buffer, bufferSize, /* output */
&numBytesDecrypted);
if (cryptStatus == kCCSuccess) {
//the returned NSData takes ownership of the buffer and will free it on deallocation
return [NSData dataWithBytesNoCopy:buffer length:numBytesDecrypted];
}
free(buffer); //free the buffer;
return nil;
}
@end
코드 here에서 사용
다음은 간단 아이폰 OS에서 데이터를 암호화하도록 만드는 NSData
카테고리입니다.
-2
언제든지 사운드 파일의 일부 비트를 뒤집은 다음 앱에서 구입 한 뒤 뒤집을 수 있습니다. 변경되는 정도에 따라 파일 머리글을 손상 시키거나 수정할 때까지 오디오를 완전히 제거 할 수 있습니다.
관련 문제
- 1. 인앱 구매 iphone의 보안
- 2. 인앱 구매
- 3. 인앱 구매 상태 감지
- 4. 결제 관련 인앱 구매
- 5. 인앱 구매 상담
- 6. iPhone 인앱 구매
- 7. 인앱 구매 서버 모델
- 8. 업데이트에서의 인앱 구매
- 9. MacOS 인앱 구매
- 10. 인앱 구매 - 번들링 (사과)
- 11. 애플 인앱 구매
- 12. iOS에서 인앱 구매 테스트
- 13. iphone 인앱 구매
- 14. 애플은 인앱 구매 영수증 확인과 관련된 보안 문제를 해결 했습니까?
- 15. 인앱 구매 회 돌이 구멍
- 16. iphone 인앱 구매 구독 상품
- 17. iPhone에서 시간에 민감한 인앱 구매
- 18. 인앱 구매 반품 0 제품
- 19. 인앱 구매 용 PHP 스크립트
- 20. 인앱 구매 앱을 업데이트하는 방법
- 21. iPhone과 비슷한 BlackBerry 인앱 구매
- 22. StoreKit을 사용한 인앱 구매 문제
- 23. 아이폰 - 실패의 인앱 구매 테스트
- 24. 인앱 구매 가능 모델의 문제
- 25. SKErrorUnknown 테스트 중 인앱 구매
- 26. iPhone에서 구매 기록 보안?
- 27. 인앱 구매 거래 영수증과 보고서의 상관 관계
- 28. 앱 ID와 ASPN, 인앱 구매 및 기타
- 29. iPhone과 같은 OVI 용 인앱 구매
- 30. iOS - 인앱 구매 데이터를 저장하는 방법은 무엇인가요?
안녕하세요. 나는 파일을 암호화하고 해독하는 것이 좋은 생각이라고 생각하지만, 모든 사운드 파일을 암호화해야한다. 어느 것이 많은 시간과 노력이 필요합니다. 그러나 어쨌든 고마워요. 네 접근 방식이 좋아. – jAmi