Schafkopf-Server/Sources/App/Extensions/Crypto+Extensions.swift
2021-12-01 22:47:19 +01:00

15 lines
259 B
Swift

import Foundation
import Crypto
extension String {
/**
Create a new access token.
*/
static func newToken() -> String {
Crypto.SymmetricKey.init(size: .bits128).withUnsafeBytes {
$0.hexEncodedString()
}
}
}