mirror of
https://github.com/xuxiaobo-bobo/boda_jsEnv.git
synced 2025-04-23 06:49:27 +08:00
11 lines
1.1 KiB
JavaScript
11 lines
1.1 KiB
JavaScript
// Crypto对象
|
|
bodavm.memory.globalobj['Crypto'] = function Crypto(){return bodavm.toolsFunc.throwError("TypeError", "Illegal constructor")}
|
|
bodavm.toolsFunc.safeProto(bodavm.memory.globalobj['Crypto'], "Crypto");
|
|
bodavm.toolsFunc.defineProperty('Crypto', "getRandomValues", {configurable:true, enumerable:true, writable:true, value:function getRandomValues (){return bodavm.toolsFunc.dispatch(this, bodavm.memory.globalobj['Crypto'].prototype, "Crypto", "getRandomValues", arguments)}},'prototype');
|
|
bodavm.toolsFunc.defineProperty('Crypto', "subtle", {configurable:true, enumerable:true, get:function subtle (){return bodavm.toolsFunc.dispatch(this, bodavm.memory.globalobj['Crypto'].prototype, "Crypto", "subtle_get", arguments)}, set:undefined},'prototype');
|
|
bodavm.toolsFunc.defineProperty('Crypto', "randomUUID", {configurable:true, enumerable:true, writable:true, value:function randomUUID (){return bodavm.toolsFunc.dispatch(this, bodavm.memory.globalobj['Crypto'].prototype, "Crypto", "randomUUID", arguments)}},'prototype');
|
|
|
|
|
|
bodavm.memory.globalobj[ 'crypto'] ={}
|
|
bodavm.memory.globalobj[ 'crypto'].__proto__ = bodavm.memory.globalobj['Crypto'] .prototype
|