Documentation
¶
Index ¶
- func BytesToPrivateKey(priv []byte) *rsa.PrivateKey
- func BytesToPublicKey(pub []byte) *rsa.PublicKey
- func CBCDecryptFile(password []byte, inputFile, outputFile string) error
- func CBCDecryptHexFile(password []byte, inputFile, outputFile string) error
- func CBCEncryptFile(password []byte, inputFile, outputFile string) error
- func CBCEncryptHexFile(password []byte, inputFile, outputFile string) error
- func CreateCertificateECDSA(key *ecdsa.PrivateKey) (*[]byte, error)
- func CreateCertificateRSA(key *rsa.PrivateKey) (*[]byte, error)
- func DecryptWithPrivateKey(ciphertext []byte, priv *rsa.PrivateKey) []byte
- func EncryptWithPublicKey(msg []byte, pub *rsa.PublicKey) []byte
- func GCMDecryptFile(password []byte, inputFile, outputFile string) error
- func GCMEncryptFile(password []byte, inputFile, outputFile string) error
- func GenerateKeyECDSA() (*ecdsa.PrivateKey, error)
- func GenerateKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey)
- func GenerateKeyPairAndSave(bits int, privFileName, pubFileName string)
- func GenerateKeyRSA(bitSize int) (*rsa.PrivateKey, error)
- func PKCS7Padding(ciphertext []byte, blockSize int) []byte
- func PKCS7Unpadding(plantext []byte) []byte
- func PrivateKeyToBytes(priv *rsa.PrivateKey) []byte
- func PublicKeyToBytes(pub *rsa.PublicKey) []byte
- func SlurpFile(fileName string) []byte
- func WriteToFile(fileName string, writeBytes []byte)
- type Cert
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToPrivateKey ¶
func BytesToPrivateKey(priv []byte) *rsa.PrivateKey
func BytesToPublicKey ¶
func CBCDecryptFile ¶
func CBCDecryptHexFile ¶
func CBCEncryptFile ¶
func CBCEncryptHexFile ¶
func CreateCertificateECDSA ¶
func CreateCertificateECDSA(key *ecdsa.PrivateKey) (*[]byte, error)
func CreateCertificateRSA ¶
func CreateCertificateRSA(key *rsa.PrivateKey) (*[]byte, error)
func DecryptWithPrivateKey ¶
func DecryptWithPrivateKey(ciphertext []byte, priv *rsa.PrivateKey) []byte
func GCMDecryptFile ¶
func GCMEncryptFile ¶
func GenerateKeyECDSA ¶
func GenerateKeyECDSA() (*ecdsa.PrivateKey, error)
func GenerateKeyPair ¶
func GenerateKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey)
func GenerateKeyPairAndSave ¶
func GenerateKeyRSA ¶
func GenerateKeyRSA(bitSize int) (*rsa.PrivateKey, error)
func PKCS7Padding ¶
PKCS7Padding adds PKCS#7 padding to data
func PKCS7Unpadding ¶
PKCS7Unpadding removes PKCS#7 padding from data
func PrivateKeyToBytes ¶
func PrivateKeyToBytes(priv *rsa.PrivateKey) []byte
func PublicKeyToBytes ¶
func WriteToFile ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.