Skip to content

Instantly share code, notes, and snippets.

View huanghantao's full-sized avatar
:octocat:
fighting

codinghuang huanghantao

:octocat:
fighting
View GitHub Profile
@huanghantao
huanghantao / RSAUtil.go
Last active March 3, 2019 02:52
RSAUtil
package RSAUtil
import (
"crypto"
"crypto/rand"
"crypto/rsa"
"crypto/sha256"
"crypto/x509"
"encoding/pem"
"errors"
@huanghantao
huanghantao / AESUtil.go
Created December 21, 2018 08:54
AESUtil
package AESUtil
import (
"bytes"
"crypto/aes"
"crypto/cipher"
"fmt"
)
func PKCS5Padding(ciphertext []byte, blockSize int) []byte {