Value BuiltinClass<Sha256>::callclass(BuiltinArgs& args) { args.usage("Sha256(@strings)"); Sha256* a = new BuiltinInstance<Sha256>(); if (!args.hasUnnamed()) return a; while (Value x = args.getNextUnnamed()) a->update(x.gcstr()); return new SuString(a->value()); }
Value BuiltinClass<SuAdler32>::callclass(BuiltinArgs& args) { args.usage("usage: Adler32(@strings)"); SuAdler32* a = new BuiltinInstance<SuAdler32>(); if (! args.hasUnnamed()) return a; while (Value x = args.getNextUnnamed()) a->update(x.gcstr()); return a->value; }