Skip to content
This repository was archived by the owner on Dec 15, 2024. It is now read-only.

Commit 713b3ce

Browse files
committed
Added default initialization values for base64
1 parent 7d07d62 commit 713b3ce

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/SwiftFoundation/Base64.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
/* Create an NSData from a Base-64 encoded NSString using the given options. By default, returns nil when the input is not recognized as valid Base-64.
3131
*/
32-
public init?(base64Encoded base64String: String, options: Base64DecodingOptions) {
32+
public init?(base64Encoded base64String: String, options: Base64DecodingOptions = []) {
3333
let encodedBytes = Array(base64String.utf8)
3434
guard let decodedBytes = Data.base64DecodeBytes(encodedBytes, options: options) else {
3535
return nil
@@ -47,7 +47,7 @@
4747

4848
/* Create an NSData from a Base-64, UTF-8 encoded NSData. By default, returns nil when the input is not recognized as valid Base-64.
4949
*/
50-
public init?(base64Encoded base64Data: Data, options: Base64DecodingOptions) {
50+
public init?(base64Encoded base64Data: Data, options: Base64DecodingOptions = []) {
5151
guard let decodedBytes = Data.base64DecodeBytes(base64Data.bytes, options: options) else {
5252
return nil
5353
}

0 commit comments

Comments
 (0)