mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-10-09 15:57:26 +02:00
[#3175] added jsvm crypto primitives
This commit is contained in:
1 parent
cdbe6d78d3
commit
02495554cf
7 files changed
+201
-54
No files matched your search
@@ -450,6 +450,11 @@ func securityBinds(vm *goja.Runtime) {
|
||||
obj := vm.NewObject()
|
||||
vm.Set("$security", obj)
|
||||
|
||||
// crypto
|
||||
obj.Set("md5", security.MD5)
|
||||
obj.Set("sha256", security.SHA256)
|
||||
obj.Set("sha512", security.SHA512)
|
||||
|
||||
// random
|
||||
obj.Set("randomString", security.RandomString)
|
||||
obj.Set("randomStringWithAlphabet", security.RandomStringWithAlphabet)
|
||||
|
||||
Reference in new issue
Block a user