Documentation ¶
Index ¶
- Constants
- func CreateKeys(opts ...*Options) (types.Bytes, types.Bytes, error)
- func Pkcs1ToPkcs8(key []byte) (types.Bytes, error)
- type KeyType
- type Options
- type Type
- type XRsa
- func (x *XRsa) Decrypt(ciphertext []byte, opts ...*Options) (types.Bytes, error)
- func (x *XRsa) Encrypt(plaintext []byte, opts ...*Options) (types.Bytes, error)
- func (x *XRsa) Sign(data []byte, opts ...*Options) (types.Bytes, error)
- func (x *XRsa) Verify(data []byte, sign []byte, opts ...*Options) error
Constants ¶
View Source
const ( DefaultType = PKCS1v15 DefaultKeyType = PKCS1 DefaultBits = 2048 DefaultHash = crypto.SHA256 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶ added in v0.0.8
type Options struct { Type Type KeyType KeyType Bits int Hash crypto.Hash //RSA-OAEP RSA-PSS Label []byte //RSA-OAEP SaltLength int //RSA-PSS }
func DefaultOptions ¶ added in v0.0.8
func DefaultOptions() *Options
Click to show internal directories.
Click to hide internal directories.