// crypto.wren
|
|
|
|
foreign class Crypto {
|
|
|
|
// Generates a random RFC-4122 UUID (version 4).
|
|
foreign static uuid4()
|
|
|
|
// Generates a UUID-v5 in the DNS namespace.
|
|
foreign static uuid5(data)
|
|
|
|
// Encrypts plaintext with a named key. Returns ByteBuffer.
|
|
foreign static encrypt(plaintext, name)
|
|
|
|
// Decrypts a ByteBuffer produced by encrypt(). Returns String or null.
|
|
foreign static decrypt(blob, name)
|
|
}
|
|
|