crypto

package module
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 14, 2021 License: MIT Imports: 1 Imported by: 0

README

crypto

go 加密封装
简单易用高效

非对称加密

ed25519 完成
ecdsa todo
rsa 完成

对称加密

des 完成
aes 完成
tea 完成 xtea 完成

摘要算法

md5 完成
hmac todo
sha1 完成
sha256 完成
sha512 完成

组合加密算法,自定义

rsa+des 完成
算法概要
加密:用des加密原文,用rsa公钥加密des密钥,用rsa私钥对原文签名
解密:用rsa私钥解密得到des密钥,用des密钥解密得到原文,用rsa公钥对原文验签

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JiaMi

type JiaMi struct {
	T  string `json:"t"`  // rsa加密后的des密钥
	St string `json:"st"` // 原文的rsa私钥签名
	C  string `json:"c"`  // des加密后的密文
}

func (*JiaMi) ToBytes

func (this *JiaMi) ToBytes() []byte

func (*JiaMi) ToJsonString

func (this *JiaMi) ToJsonString() string

Directories

Path Synopsis
Package gaes provides useful API for AES encryption/decryption algorithms.
Package gaes provides useful API for AES encryption/decryption algorithms.
Package cryptobyte contains types that help with parsing and constructing length-prefixed, binary messages, including ASN.1 DER.
Package cryptobyte contains types that help with parsing and constructing length-prefixed, binary messages, including ASN.1 DER.
asn1
Package asn1 contains supporting types for parsing and building ASN.1 messages with the cryptobyte package.
Package asn1 contains supporting types for parsing and building ASN.1 messages with the cryptobyte package.
Package gdes provides useful API for DES encryption/decryption algorithms.
Package gdes provides useful API for DES encryption/decryption algorithms.
gm2
Package md5 provides useful API for MD5 encryption algorithms.
Package md5 provides useful API for MD5 encryption algorithms.
rsa+des混合加密
rsa+des混合加密
Package gsha1 provides useful API for SHA1 encryption algorithms.
Package gsha1 provides useful API for SHA1 encryption algorithms.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL