Skip to content

Instantly share code, notes, and snippets.

@edwinteo96
edwinteo96 / token_checklist.md
Created August 16, 2023 01:06 — forked from shayanb/token_checklist.md
Token Checklist Table
Token Feature Known Vulnerabilities Resources Examples
ERC20 Allowance Double withdrawal (front-running)
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package javaapplication1;
import java.util.Scanner;
/**
*
@edwinteo96
edwinteo96 / AesCbcExample.java
Created June 30, 2023 03:51 — forked from patrickfav/AesCbcExample.java
Companion code to my article about AES+CBC with Encrypt-then-MAC.
package at.favre.lib.armadillo;
import org.junit.Test;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.SecureRandom;
import java.util.Arrays;
@edwinteo96
edwinteo96 / AesGcmTest.java
Created June 30, 2023 03:20 — forked from patrickfav/AesGcmTest.java
Java Authenticated Encryption with AES and GCM.
package at.favre.lib.bytes.otherPackage;
import org.junit.Test;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.spec.GCMParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.nio.ByteBuffer;
import java.nio.charset.StandardCharsets;