Skip to content

Instantly share code, notes, and snippets.

@Mobius1
Mobius1 / __init__.lua
Last active January 10, 2021 19:40
Spawn a dropped weapon with attachments in Venice Unleashed
-- Spawns dropped weapons and adds random attachments.
-- List of weapons to add
local weapons = {
{
name = "M98B",
container = "Weapons/Model98B/U_M98B",
slot = WeaponSlot.WeaponSlot_0,
attachments = {
optics = {
/**
* utilities to do sigv4
* @class SigV4Utils
*/
function SigV4Utils() {}
SigV4Utils.getSignatureKey = function (key, date, region, service) {
var kDate = AWS.util.crypto.hmac('AWS4' + key, date, 'buffer');
var kRegion = AWS.util.crypto.hmac(kDate, region, 'buffer');
var kService = AWS.util.crypto.hmac(kRegion, service, 'buffer');