Skip to content

Instantly share code, notes, and snippets.

View ridneto's full-sized avatar

Ridineu de Moraes Neto ridneto

View GitHub Profile
@ridneto
ridneto / Crypt.java
Created November 25, 2022 04:41 — forked from kobeumut/Crypt.java
AES128 CBC mode in Java, Kotlin and Ruby
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
import java.util.Base64;
public class Encryptor {
public static String encrypt(String key, String initVector, String value) {
try {
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5PADDING");
IvParameterSpec iv = new IvParameterSpec(initVector.getBytes("UTF-8"));
@ridneto
ridneto / curl.md
Created October 29, 2020 20:26 — forked from subfuzion/curl.md
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@ridneto
ridneto / error_unform_hook
Created September 13, 2020 20:32
Error hook useField unform react-native
[Sun Sep 13 2020 17:24:48.914] ERROR TypeError: undefined is not an object (evaluating 'n[i]')
This error is located at:
in Input (at SignIn/index.tsx:46)
in RCTView (at View.js:34)
in View (created by Context.Consumer)
in StyledNativeComponent (created by Styled(View))
in Styled(View) (at SignIn/index.tsx:39)
in RCTView (at View.js:34)
in View (at ScrollView.js:1124)