Cog/Utils/SHA256Digest.h
Christopher Snowhill 1da6cf2557 Deduplicate artwork using hashes
Artwork deduplication should be done with hashes, not by full data
comparison. This should be a lot faster loading artwork from files now,
especially if the playlist already contains a lot of unique artwork.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-22 23:10:02 -08:00

22 lines
455 B
Objective-C

//
// SHA256Digest.h
// Cog
//
// Created by Christopher Snowhill on 2/22/22.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface SHA256Digest : NSObject
+ (NSData *)digestBytes:(const void *)bytes length:(size_t)length;
+ (NSData *)digestData:(const NSData *)data;
+ (NSString *)digestBytesAsString:(const void *)bytes length:(size_t)length;
+ (NSString *)digestDataAsString:(const NSData *)data;
@end
NS_ASSUME_NONNULL_END