Jelajahi Sumber

Remove redundant access atributes

Marcin Krzyzanowski 6 tahun lalu
induk
melakukan
7d8516ba47

+ 2 - 2
Sources/CryptoSwift/Foundation/Array+Foundation.swift

@@ -16,11 +16,11 @@
 import Foundation
 
 public extension Array where Element == UInt8 {
-    public func toBase64() -> String? {
+    func toBase64() -> String? {
         return Data(bytes: self).base64EncodedString()
     }
 
-    public init(base64: String) {
+    init(base64: String) {
         self.init()
 
         guard let decodedData = Data(base64Encoded: base64) else {

+ 1 - 1
Sources/CryptoSwift/PKCS/PBKDF1.swift

@@ -19,7 +19,7 @@ public extension PKCS5 {
     /// PBKDF1 is recommended only for compatibility with existing
     /// applications since the keys it produces may not be large enough for
     /// some applications.
-    public struct PBKDF1 {
+    struct PBKDF1 {
         public enum Error: Swift.Error {
             case invalidInput
             case derivedKeyTooLong

+ 1 - 1
Sources/CryptoSwift/PKCS/PBKDF2.swift

@@ -27,7 +27,7 @@ public extension PKCS5 {
     ///
     /// PBKDF2 - Password-Based Key Derivation Function 2. Key stretching technique.
     ///          DK = PBKDF2(PRF, Password, Salt, c, dkLen)
-    public struct PBKDF2 {
+    struct PBKDF2 {
         public enum Error: Swift.Error {
             case invalidInput
             case derivedKeyTooLong

+ 2 - 2
Sources/CryptoSwift/Scrypt.swift

@@ -103,7 +103,7 @@ public final class Scrypt {
     }
 }
 
-fileprivate extension Scrypt {
+private extension Scrypt {
     /// Computes `B = SMix_r(B, N)`.
     ///
     /// The input `block` must be `128*r` bytes in length; the temporary storage `v` must be `128*r*n` bytes in length;
@@ -240,7 +240,7 @@ fileprivate extension Scrypt {
         }
     }
 
-    @inline(__always) fileprivate func blockXor(_ dest: UnsafeMutableRawPointer, _ src: UnsafeRawPointer, _ len: Int) {
+    @inline(__always) func blockXor(_ dest: UnsafeMutableRawPointer, _ src: UnsafeRawPointer, _ len: Int) {
         let D = dest.assumingMemoryBound(to: UInt64.self)
         let S = src.assumingMemoryBound(to: UInt64.self)
         let L = len / MemoryLayout<UInt64>.size