15 lines
330 B
Plaintext
15 lines
330 B
Plaintext
|
import "crypto" for Crypto
|
||
|
|
||
|
|
||
|
var mainFiber = Fiber.new {
|
||
|
System.print("Random v4 : %(Crypto.uuid4())")
|
||
|
System.print("DNS v5 : %(Crypto.uuid5("example.com"))")
|
||
|
|
||
|
var blob = Crypto.encrypt("secret message", "my-key")
|
||
|
System.print("decrypted : %(Crypto.decrypt(blob, "my-key"))")
|
||
|
|
||
|
while(true){
|
||
|
Fiber.yield()
|
||
|
}
|
||
|
}
|