mirror of https://github.com/oxen-io/session-ios
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			23 lines
		
	
	
		
			556 B
		
	
	
	
		
			Swift
		
	
			
		
		
	
	
			23 lines
		
	
	
		
			556 B
		
	
	
	
		
			Swift
		
	
//
 | 
						|
//  Copyright (c) 2018 Open Whisper Systems. All rights reserved.
 | 
						|
//
 | 
						|
 | 
						|
import Foundation
 | 
						|
 | 
						|
extension Data {
 | 
						|
    public var hexadecimalString: String {
 | 
						|
        return (self as NSData).hexadecimalString()
 | 
						|
    }
 | 
						|
    
 | 
						|
    public static func data(fromHex hexString: String) -> Data? {
 | 
						|
        guard let data = NSData(fromHexString : hexString) else {
 | 
						|
            return nil
 | 
						|
        }
 | 
						|
        return data as Data
 | 
						|
    }
 | 
						|
 | 
						|
    public func ows_constantTimeIsEqual(to other: Data) -> Bool {
 | 
						|
        return (self as NSData).ows_constantTimeIsEqual(to: other)
 | 
						|
    }
 | 
						|
}
 |