Base64.m
changeset 13 c59dec088990
parent 1 e55a17cdabd2
child 34 50c4f26bcc1b
     1.1 --- a/Base64.m	Thu Mar 20 09:05:58 2008 -0700
     1.2 +++ b/Base64.m	Sun Jun 01 14:01:44 2008 -0700
     1.3 @@ -5,8 +5,9 @@
     1.4  //  Created by Jens Alfke on 1/27/08.
     1.5  //  Copyright 2008 Jens Alfke. All rights reserved.
     1.6  //
     1.7 -//  Adapted from SSCrypto.m by Ed Silva;
     1.8 +//  Portions adapted from SSCrypto.m by Ed Silva;
     1.9  //  Copyright (c) 2003-2006 Septicus Software. All rights reserved.
    1.10 +//  Portions taken from uncopyrighted code posted by Dave Dribin.
    1.11  //
    1.12  
    1.13  #import "Base64.h"
    1.14 @@ -94,6 +95,8 @@
    1.15  
    1.16  - (NSString *)my_hexString
    1.17  {
    1.18 +    //  Adapted from SSCrypto.m by Ed Silva:
    1.19 +    //  Copyright (c) 2003-2006 Septicus Software. All rights reserved.
    1.20      const UInt8 *bytes = self.bytes;
    1.21      NSUInteger length = self.length;
    1.22      char out[2*length+1];
    1.23 @@ -106,6 +109,8 @@
    1.24  
    1.25  - (NSString *)my_hexDump
    1.26  {
    1.27 +    //  Adapted from SSCrypto.m by Ed Silva:
    1.28 +    //  Copyright (c) 2003-2006 Septicus Software. All rights reserved.
    1.29      NSMutableString *ret=[NSMutableString stringWithCapacity:[self length]*2];
    1.30      /* dumps size bytes of *data to string. Looks like:
    1.31       * [0000] 75 6E 6B 6E 6F 77 6E 20
    1.32 @@ -165,3 +170,26 @@
    1.33  }
    1.34  
    1.35  @end
    1.36 +
    1.37 +
    1.38 +/*
    1.39 + Copyright (c) 2008, Jens Alfke <jens@mooseyard.com>. All rights reserved.
    1.40 + 
    1.41 + Redistribution and use in source and binary forms, with or without modification, are permitted
    1.42 + provided that the following conditions are met:
    1.43 + 
    1.44 + * Redistributions of source code must retain the above copyright notice, this list of conditions
    1.45 + and the following disclaimer.
    1.46 + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions
    1.47 + and the following disclaimer in the documentation and/or other materials provided with the
    1.48 + distribution.
    1.49 + 
    1.50 + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
    1.51 + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
    1.52 + FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRI-
    1.53 + BUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    1.54 + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
    1.55 +  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
    1.56 + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 
    1.57 + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    1.58 + */