/* * Auto-generated by Frida. Please modify to match the signature of SecKeyEncrypt. * This stub is currently auto-generated from manpages when available. * * For full API reference, see: https://frida.re/docs/javascript-api/ */
{ /** * Called synchronously when about to call SecKeyEncrypt. * * @this {object} - Object allowing you to store state for use in onLeave. * @param {function} log - Call this function with a string to be presented to the user. * @param {array} args - Function arguments represented as an array of NativePointer objects. * For example use args[0].readUtf8String() if the first argument is a pointer to a C string encoded as UTF-8. * It is also possible to modify arguments by assigning a NativePointer object to an element of this array. * @param {object} state - Object allowing you to keep state across function calls. * Only one JavaScript function will execute at a time, so do not worry about race-conditions. * However, do not use this to store function arguments across onEnter/onLeave, but instead * use "this" which is an object for keeping state local to an invocation. */ onEnter(log, args, state) { log('SecKeyEncrypt()'); log('SecKeyEncrypt() key:' + hexdump(args[0])); log('SecKeyEncrypt() padding:' + (args[1]).toInt32()); log('SecKeyEncrypt() plainText:' + (args[2]).readCString()); log('SecKeyEncrypt() plainTextSize:' + (args[3]).toInt32()); this.args4=args[4]; this.args5=args[5]; },
/** * Called synchronously when about to return from SecKeyEncrypt. * * See onEnter for details. * * @this {object} - Object allowing you to access state stored in onEnter. * @param {function} log - Call this function with a string to be presented to the user. * @param {NativePointer} retval - Return value represented as a NativePointer object. * @param {object} state - Object allowing you to keep state across function calls. */ onLeave(log, retval, state) { log('SecKeyEncrypt() cipherText:'+hexdump(this.args4)); log('SecKeyEncrypt() cipherTextSize:'+(this.args5).readInt()); } }
/* * Auto-generated by Frida. Please modify to match the signature of CC_SHA1. * This stub is currently auto-generated from manpages when available. * * For full API reference, see: https://frida.re/docs/javascript-api/ */
{ /** * Called synchronously when about to call CC_SHA1. * * @this {object} - Object allowing you to store state for use in onLeave. * @param {function} log - Call this function with a string to be presented to the user. * @param {array} args - Function arguments represented as an array of NativePointer objects. * For example use args[0].readUtf8String() if the first argument is a pointer to a C string encoded as UTF-8. * It is also possible to modify arguments by assigning a NativePointer object to an element of this array. * @param {object} state - Object allowing you to keep state across function calls. * Only one JavaScript function will execute at a time, so do not worry about race-conditions. * However, do not use this to store function arguments across onEnter/onLeave, but instead * use "this" which is an object for keeping state local to an invocation. */ onEnter(log, args, state) { log('CC_SHA1() onEnter:' + args[0].readCString(args[1].toInt32())); this.args2 =args[2]; },
/** * Called synchronously when about to return from CC_SHA1. * * See onEnter for details. * * @this {object} - Object allowing you to access state stored in onEnter. * @param {function} log - Call this function with a string to be presented to the user. * @param {NativePointer} retval - Return value represented as a NativePointer object. * @param {object} state - Object allowing you to keep state across function calls. */ onLeave(log, retval, state) { log('CC_SHA1() onLeave:' + hexdump(this.args2,{length:20})); } }