瀏覽代碼

Refactor public methods to internal

Marcin Krzyżanowski 9 年之前
父節點
當前提交
aee45c4188
共有 2 個文件被更改,包括 8 次插入8 次删除
  1. 4 4
      Sources/CryptoSwift/Int+Extension.swift
  2. 4 4
      Sources/CryptoSwift/UInt32+Extension.swift

+ 4 - 4
Sources/CryptoSwift/Int+Extension.swift

@@ -47,12 +47,12 @@ extension Int {
 extension Int {
     
     /** Shift bits to the left. All bits are shifted (including sign bit) */
-    fileprivate mutating func shiftLeft(by count: Int) {
+    mutating func shiftLeft(by count: Int) {
         self = CryptoSwift.shiftLeft(self, by: count) //FIXME: count:
     }
     
     /** Shift bits to the right. All bits are shifted (including sign bit) */
-    fileprivate mutating func shiftRight(by count: Int) {
+    mutating func shiftRight(by count: Int) {
         if (self == 0) {
             return
         }
@@ -81,12 +81,12 @@ extension Int {
 // Left operator
 
 /** shift left and assign with bits truncation */
-public func &<<= (lhs: inout Int, rhs: Int) {
+func &<<= (lhs: inout Int, rhs: Int) {
     lhs.shiftLeft(by: rhs)
 }
 
 /** shift left with bits truncation */
-public func &<< (lhs: Int, rhs: Int) -> Int {
+func &<< (lhs: Int, rhs: Int) -> Int {
     var l = lhs;
     l.shiftLeft(by: rhs)
     return l

+ 4 - 4
Sources/CryptoSwift/UInt32+Extension.swift

@@ -31,7 +31,7 @@ extension UInt32 {
 extension UInt32 {
     
     /** Shift bits to the left. All bits are shifted (including sign bit) */
-    fileprivate mutating func shiftLeft(by count: UInt32) {
+    mutating func shiftLeft(by count: UInt32) {
         if (self == 0) {
             return
         }
@@ -57,7 +57,7 @@ extension UInt32 {
     }
     
     /** Shift bits to the right. All bits are shifted (including sign bit) */
-    fileprivate mutating func shiftRight(by count: UInt32) {
+    mutating func shiftRight(by count: UInt32) {
         if (self == 0) {
             return
         }
@@ -85,12 +85,12 @@ extension UInt32 {
 }
 
 /** shift left and assign with bits truncation */
-public func &<<= (lhs: inout UInt32, rhs: UInt32) {
+func &<<= (lhs: inout UInt32, rhs: UInt32) {
     lhs.shiftLeft(by: rhs)
 }
 
 /** shift left with bits truncation */
-public func &<< (lhs: UInt32, rhs: UInt32) -> UInt32 {
+func &<< (lhs: UInt32, rhs: UInt32) -> UInt32 {
     var l = lhs;
     l.shiftLeft(by: rhs)
     return l