Skip to content

Commit

Permalink
Make PIVPadding internal.
Browse files Browse the repository at this point in the history
  • Loading branch information
jensutbult committed Feb 21, 2024
1 parent 492e7d6 commit e3a0294
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions YubiKit/YubiKit/PIV/PIVPadding.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public enum PIVPaddingError: Error {
case unsupportedAlgorithm, unknownKeyType, unknownPaddingError, wrongInputBufferSize
}

public enum PIVPadding {
internal enum PIVPadding {

public static func padData(_ data: Data, keyType: PIVKeyType, algorithm: SecKeyAlgorithm) throws -> Data {
internal static func padData(_ data: Data, keyType: PIVKeyType, algorithm: SecKeyAlgorithm) throws -> Data {
if keyType == .RSA1024 || keyType == .RSA2048 {
let keySize = keyType.size * 8
let attributes = [kSecAttrKeyType: kSecAttrKeyTypeRSA,
Expand Down Expand Up @@ -95,7 +95,7 @@ public enum PIVPadding {
throw PIVPaddingError.unknownPaddingError
}

public static func unpadRSAData(_ data: Data, algorithm: SecKeyAlgorithm) throws -> Data {
internal static func unpadRSAData(_ data: Data, algorithm: SecKeyAlgorithm) throws -> Data {
let size: UInt
switch data.count {
case 1024 / 8:
Expand Down

0 comments on commit e3a0294

Please sign in to comment.