Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidRSAPrivateKeyFormat = errors.New("indalid RSA private key format") ErrInvalidRSAPrivateKeyBlockType = errors.New("invalid block type") )
Functions ¶
func NewRSAKeyManager ¶
func NewRSAKeyManager() *rsaKeyManager
Types ¶
type AESCryptor ¶
type AESCryptor struct {
// contains filtered or unexported fields
}
func NewAESCryptor ¶
func NewAESCryptor(key string) *AESCryptor
type BcryptoHashGenerator ¶
type BcryptoHashGenerator struct {
// contains filtered or unexported fields
}
func NewBcryptoHashGenerator ¶
func NewBcryptoHashGenerator() *BcryptoHashGenerator
type HashGenerator ¶
type RSAKeyManager ¶
type RSAKeyManager interface { GenerateRSAPrivateKey(bits int) (*rsa.PrivateKey, error) ReadPemFile(filename string) (*rsa.PrivateKey, error) ReadPemBytes(b []byte) (*rsa.PrivateKey, error) ConvertFormat(privateKey *rsa.PrivateKey, format RSAPrivateKeyFormat) ([]byte, error) }
type RSAPrivateKeyBlockType ¶
type RSAPrivateKeyBlockType int
const ( RSAPrivateKeyKeyTypeUnknown RSAPrivateKeyBlockType = iota RSAPrivateKeyBlockTypePKCS1 RSAPrivateKeyBlockTypePKCS8 )
func ParseRSAPrivateKeyBlockType ¶
func ParseRSAPrivateKeyBlockType(v string) RSAPrivateKeyBlockType
func (RSAPrivateKeyBlockType) String ¶
func (f RSAPrivateKeyBlockType) String() string
type RSAPrivateKeyFormat ¶
type RSAPrivateKeyFormat int
const ( RSAPrivateKeyFormatUnsupported RSAPrivateKeyFormat = iota RSAPrivateKeyFormatDer RSAPrivateKeyFormatPem )
func ParseRSAPrivateKeyFormat ¶
func ParseRSAPrivateKeyFormat(v string) RSAPrivateKeyFormat
func (RSAPrivateKeyFormat) String ¶
func (f RSAPrivateKeyFormat) String() string
Click to show internal directories.
Click to hide internal directories.