diff --git a/Sources/JWSETKit/Cryptography/Algorithms/KeyEncryption.swift b/Sources/JWSETKit/Cryptography/Algorithms/KeyEncryption.swift index da2379f..5d2eb1c 100644 --- a/Sources/JWSETKit/Cryptography/Algorithms/KeyEncryption.swift +++ b/Sources/JWSETKit/Cryptography/Algorithms/KeyEncryption.swift @@ -468,5 +468,5 @@ extension JSONWebAlgorithm where Self == JSONWebKeyEncryptionAlgorithm { public static var ecdhEphemeralStaticAESKeyWrap256: Self { "ECDH-ES+A256KW" } /// **Key Management**: No encryption for content key. - public static var direct: Self { "direct" } + public static var direct: Self { "dir" } } diff --git a/Sources/JWSETKit/Entities/JWS/JWS.swift b/Sources/JWSETKit/Entities/JWS/JWS.swift index 1cff41a..8a5e6ff 100644 --- a/Sources/JWSETKit/Entities/JWS/JWS.swift +++ b/Sources/JWSETKit/Entities/JWS/JWS.swift @@ -157,7 +157,7 @@ public struct JSONWebSignature: Hashable, Sendab extension String { public init(jws: JSONWebSignature) throws { - var encoder = JSONEncoder.encoder + let encoder = JSONEncoder.encoder encoder.userInfo[.jwsEncodedRepresentation] = JSONWebSignatureRepresentation.compact self = try String(String(decoding: encoder.encode(jws), as: UTF8.self).dropFirst().dropLast()) } diff --git a/Sources/JWSETKit/Extensions/Lock.swift b/Sources/JWSETKit/Extensions/Lock.swift index 887454c..cbd28d6 100644 --- a/Sources/JWSETKit/Extensions/Lock.swift +++ b/Sources/JWSETKit/Extensions/Lock.swift @@ -7,7 +7,7 @@ import Foundation -final class ReadWriteLock: Sendable { +final class ReadWriteLock: @unchecked Sendable { private let lock: UnsafeMutablePointer init() { @@ -39,7 +39,7 @@ final class ReadWriteLock: Sendable { /// Synchronizing read and writes on a shared mutable property. @propertyWrapper -public struct ReadWriteLocked { +public final class ReadWriteLocked: @unchecked Sendable { private let lock = ReadWriteLock() private var _value: T @@ -56,5 +56,3 @@ public struct ReadWriteLocked { self._value = wrappedValue } } - -extension ReadWriteLocked: Sendable where T: Sendable {}