Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I might be a back-end developer, who knows?

Porama6400 Porama6400

💭
I might be a back-end developer, who knows?
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am porama6400 on github.
  • I am porama6400 (https://keybase.io/porama6400) on keybase.
  • I have a public key whose fingerprint is E4F4 5B3D 263C E4B9 8819 8738 ABCA 1CA9 2E1E 410C

To claim this, I am signing this object:

@Porama6400
Porama6400 / Checksum.java
Created Jan 12, 2018
A method to checksum a file
View Checksum.java
public static String checksum(File file) throws IOException, NoSuchAlgorithmException {
MessageDigest digest = MessageDigest.getInstance("SHA-256");
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(file));
byte[] buff = new byte[bis.available()];
bis.read(buff, 0, buff.length);
byte[] hash = digest.digest(buff);
return new BASE64Encoder().encode(hash);
}
@Porama6400
Porama6400 / EasyAES.java
Created Apr 30, 2016
Make your life easier with AES Encryption :) by Porama6400
View EasyAES.java
package me.Porama6400.SOMEWHERE;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
/**
* Created by Porama6400 on 30/4/2016.
*/
public class EasyAES {
byte[] key;