~ubuntuone-ios-client-team/ubuntuone-ios-files/trunk

« back to all changes in this revision

Viewing changes to Files/U1Hasher.m

  • Committer: Tarmac
  • Author(s): mike.mccracken@canonical.com
  • Date: 2013-05-29 18:52:51 UTC
  • mfrom: (100.6.7 2selfish-hasher)
  • Revision ID: tarmac-20130529185251-pxoj6kkqx80qeig5
- change to allow concurrent hashers

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
        return [NSData dataWithBytesNoCopy:magicDigest length:CC_SHA1_DIGEST_LENGTH];
48
48
}
49
49
 
50
 
+ (U1Hasher *)sharedHasher{
51
 
        static U1Hasher *sharedHasher = nil;
52
 
        if (sharedHasher == nil)
53
 
        {
54
 
                sharedHasher = [[U1Hasher alloc] init];
55
 
        }
56
 
        return sharedHasher;
57
 
}
58
 
 
59
50
- (id)init{
60
51
        if (!(self = [super init])){
61
52
                return nil;