 
 /// All the bytes that are required to be padded are padded with zero.
 /// Zero padding may not be reversible if the original file ends with one or more zero bytes.
-public struct ZeroPadding: Padding {
-    public init() {
-    }
-
-    public func add(to bytes: Array<UInt8>, blockSize:Int) -> Array<UInt8> {
+internal struct ZeroPadding: Padding {
+    internal init() {
+    }
+
+    internal func add(to bytes: Array<UInt8>, blockSize:Int) -> Array<UInt8> {
         let paddingCount = blockSize - (bytes.count % blockSize)
         if paddingCount > 0 {
             return bytes + Array<UInt8>(repeating: 0, count: paddingCount)

        return UInt16(s)
    }

    public func sha256() -> Data? {
        let result = Digest.sha256(self.bytes)
        return Data(bytes: result)
    }

    public func sha512() -> Data? {
        let result = Digest.sha512(self.bytes)
        return Data(bytes: result)
    }

    public func authenticate(with authenticator: Authenticator) throws -> Data {
        let result = try authenticator.authenticate(self.bytes)
        return Data(bytes: result)
    }

//  Copyright (c) 2014 Marcin Krzyzanowski. All rights reserved.
//

internal protocol Authenticator {
    /// Generates an authenticator for message using a one-time key and returns the 16-byte result
    func authenticate(_ bytes: Array<UInt8>) throws -> Array<UInt8>
}
