Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

as-chain

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

as-chain - npm Package Compare versions

Comparing version 0.0.58 to 0.0.59

48

assembly/crypto.ts

@@ -9,4 +9,18 @@ import { check } from "./system";

export class Checksum160 implements Packer {
data!: u8[];
data: u8[];
constructor(
data: u8[] | null = null
){
this.data = new Array<u8>(20);
if (data) {
check(this.data.length == 20, "bad checksum length");
this.assign(data);
}
}
assign(value: u8[]): void {
check(value.length == 20, "bad assign length");
env.memcpy(this.data.dataStart, value.dataStart, 20);
}
pack(): u8[] {

@@ -88,4 +102,18 @@ return this.data.slice(0);

export class Checksum512 implements Packer {
data!: u8[];
data: u8[];
constructor(
data: u8[] | null = null
){
this.data = new Array<u8>(64);
if (data) {
check(this.data.length == 64, "bad checksum length");
this.assign(data);
}
}
assign(value: u8[]): void {
check(value.length == 64, "bad assign length");
env.memcpy(this.data.dataStart, value.dataStart, 64);
}
pack(): u8[] {

@@ -121,4 +149,18 @@ return this.data.slice(0);

export class Checksum1024 implements Packer {
data!: u8[];
data: u8[];
constructor(
data: u8[] | null = null
){
this.data = new Array<u8>(128);
if (data) {
check(this.data.length == 128, "bad checksum length");
this.assign(data);
}
}
assign(value: u8[]): void {
check(value.length == 128, "bad assign length");
env.memcpy(this.data.dataStart, value.dataStart, 128);
}
pack(): u8[] {

@@ -125,0 +167,0 @@ return this.data.slice(0);

2

package.json
{
"name": "as-chain",
"version": "0.0.58",
"version": "0.0.59",
"description": "chain module for assemblyscript",

@@ -5,0 +5,0 @@ "main": "js/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc