Skip to content

Commit

Permalink
Rewrite Base64 with protocols, and update coding style
Browse files Browse the repository at this point in the history
  • Loading branch information
leoho0722 committed Feb 9, 2024
1 parent 59a1429 commit c70d055
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions Sources/SwiftHelpers/Types/Base64/Base64.swift
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,8 @@ public extension Base64 {
@available(
*,
deprecated,
renamed: "encodedString(from:using:)",
message: "Deprecated since version 0.0.17, renamed to encodedString(from:using:) and will be removed in a future version"
renamed: "base64EncodedString(from:)",
message: "Deprecated since version 0.0.17, renamed to base64EncodedString(from:) and will be removed in a future version"
)
static func base64EncodedString(from str: String,
operation: Base64.Encoding) -> String {
Expand Down Expand Up @@ -256,12 +256,7 @@ public extension Base64 {
/// - operation: ``Decoding``, perform base64 / base64URL conversion operation
/// - Throws: ``DecodingError``
/// - Returns: `Data` initialized via base64 / base64URL encoded string
@available(
*,
deprecated,
renamed: "decodedData(from:using:)",
message: "Deprecated since version 0.0.17, renamed to decodedData(from:using:) and will be removed in a future version"
)
@available(*, unavailable)
static func base64DecodedData(from str: String,
operation: Base64.Encoding) throws -> Data {
switch operation {
Expand Down Expand Up @@ -294,8 +289,8 @@ public extension Base64 {
@available(
*,
deprecated,
renamed: "decodedString(from:using:)",
message: "Deprecated since version 0.0.17, renamed to decodedString(from:using:) and will be removed in a future version"
renamed: "base64DecodedString(from:)",
message: "Deprecated since version 0.0.17, renamed to base64DecodedString(from:) and will be removed in a future version"
)
static func base64DecodedString(from str: String,
operation: Base64.Encoding) throws -> String {
Expand Down

0 comments on commit c70d055

Please sign in to comment.