Add table persistence, organize files
This commit is contained in:
14
Sources/App/Extensions/Crypto+Extensions.swift
Normal file
14
Sources/App/Extensions/Crypto+Extensions.swift
Normal file
@@ -0,0 +1,14 @@
|
||||
import Foundation
|
||||
import Crypto
|
||||
|
||||
extension String {
|
||||
|
||||
/**
|
||||
Create a new access token.
|
||||
*/
|
||||
static func newToken() -> String {
|
||||
Crypto.SymmetricKey.init(size: .bits128).withUnsafeBytes {
|
||||
$0.hexEncodedString()
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user