Skip to content

Instantly share code, notes, and snippets.

View rickmune's full-sized avatar

Patrick rickmune

View GitHub Profile
@rickmune
rickmune / DialPadFragment.kt
Created May 15, 2024 19:41 — forked from ziginsider/DialPadFragment.kt
Android: Request permission with rationale via registerForActivityResult example
package com.some.site.dialpad
import android.content.Context
import android.os.Bundle
import android.view.KeyEvent
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.activity.result.contract.ActivityResultContracts
import androidx.fragment.app.Fragment
@rickmune
rickmune / fuzzy.java
Last active November 21, 2018 13:43
A util that comes in handy when you want to encrypt any text and latter on decrypt it. Symmetric encryption.
package com.rickmune.sample.api.security.fuzzy;
import java.security.SecureRandom;
import javax.crypto.Cipher;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
public class SecThing {