import CommonCrypto
import Foundation

extension String {
    // swiftlint:disable force_unwrapping
    var base64Encoded: String {
        let utf8 = data(using: .utf8)!
        let base64 = utf8.base64EncodedString()
        return base64
    }

    var base64Decoded: String {
        let data = Data(base64Encoded: self)!
        return String(data: data, encoding: .utf8)!
    }
}
