@@ -22,7 +22,7 @@ import Foundation
2222///
2323/// This protocol defines the interface for converting string-based configuration
2424/// values into binary data. Different implementations can support various encoding
25- /// formats such as Base64 , hexadecimal, or other custom encodings.
25+ /// formats such as base64 , hexadecimal, or other custom encodings.
2626///
2727/// ## Usage
2828///
@@ -32,7 +32,7 @@ import Foundation
3232///
3333/// ```swift
3434/// let decoder: ConfigBytesFromStringDecoder = .base64
35- /// let bytes = decoder.decode("SGVsbG8gV29ybGQ=") // "Hello World" in Base64
35+ /// let bytes = decoder.decode("SGVsbG8gV29ybGQ=") // "Hello World" in base64
3636/// ```
3737public protocol ConfigBytesFromStringDecoder : Sendable {
3838
@@ -48,17 +48,17 @@ public protocol ConfigBytesFromStringDecoder: Sendable {
4848 func decode( _ value: String ) -> [ UInt8 ] ?
4949}
5050
51- /// A decoder that converts Base64 -encoded strings into byte arrays.
51+ /// A decoder that converts base64 -encoded strings into byte arrays.
5252///
53- /// This decoder interprets string configuration values as Base64 -encoded data
53+ /// This decoder interprets string configuration values as base64 -encoded data
5454/// and converts them to their binary representation.
55- public struct Base64BytesFromStringDecoder : Sendable {
55+ public struct ConfigBytesFromBase64StringDecoder : Sendable {
5656
57- /// Creates a new Base64 decoder.
57+ /// Creates a new base64 decoder.
5858 public init ( ) { }
5959}
6060
61- extension Base64BytesFromStringDecoder : ConfigBytesFromStringDecoder {
61+ extension ConfigBytesFromBase64StringDecoder : ConfigBytesFromStringDecoder {
6262 // swift-format-ignore: AllPublicDeclarationsHaveDocumentation
6363 public func decode( _ value: String ) -> [ UInt8 ] ? {
6464 guard let data = Data ( base64Encoded: value) else {
@@ -68,9 +68,9 @@ extension Base64BytesFromStringDecoder: ConfigBytesFromStringDecoder {
6868 }
6969}
7070
71- extension ConfigBytesFromStringDecoder where Self == Base64BytesFromStringDecoder {
71+ extension ConfigBytesFromStringDecoder where Self == ConfigBytesFromBase64StringDecoder {
7272
73- /// A decoder that interprets string values as Base64 -encoded data.
73+ /// A decoder that interprets string values as base64 -encoded data.
7474 public static var base64 : Self { . init( ) }
7575}
7676
@@ -85,13 +85,13 @@ extension ConfigBytesFromStringDecoder where Self == Base64BytesFromStringDecode
8585/// The decoder expects strings with an even number of characters, where each
8686/// pair of characters represents one byte. For example, "48656C6C6F" represents
8787/// the bytes for "Hello".
88- public struct HexByteFromStringDecoder : Sendable {
88+ public struct ConfigBytesFromHexStringDecoder : Sendable {
8989
9090 /// Creates a new hexadecimal decoder.
9191 public init ( ) { }
9292}
9393
94- extension HexByteFromStringDecoder : ConfigBytesFromStringDecoder {
94+ extension ConfigBytesFromHexStringDecoder : ConfigBytesFromStringDecoder {
9595 // swift-format-ignore: AllPublicDeclarationsHaveDocumentation
9696 public func decode( _ value: String ) -> [ UInt8 ] ? {
9797 if value. count % 2 != 0 {
@@ -113,7 +113,7 @@ extension HexByteFromStringDecoder: ConfigBytesFromStringDecoder {
113113 }
114114}
115115
116- extension ConfigBytesFromStringDecoder where Self == HexByteFromStringDecoder {
116+ extension ConfigBytesFromStringDecoder where Self == ConfigBytesFromHexStringDecoder {
117117
118118 /// A decoder that interprets string values as hexadecimal-encoded data.
119119 public static var hex : Self { . init( ) }
0 commit comments