15 lines
259 B
Swift
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()
|
|
}
|
|
}
|
|
}
|