Documentation
¶
Overview ¶
Package rsa implements RSA encryption, decryption, signing, and verification with streaming support. It provides RSA operations using the standard RSA algorithm with support for different key sizes and various padding schemes.
Index ¶
- func NewStreamDecrypter(r io.Reader, kp *keypair.RsaKeyPair) io.Reader
- func NewStreamEncrypter(w io.Writer, kp *keypair.RsaKeyPair) io.WriteCloser
- func NewStreamSigner(w io.Writer, kp *keypair.RsaKeyPair) io.WriteCloser
- func NewStreamVerifier(r io.Reader, kp *keypair.RsaKeyPair) io.WriteCloser
- type DecryptError
- type EncryptError
- type ReadError
- type SignError
- type StdDecrypter
- type StdEncrypter
- type StdSigner
- type StdVerifier
- type StreamDecrypter
- type StreamEncrypter
- type StreamSigner
- type StreamVerifier
- type VerifyError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStreamEncrypter ¶
func NewStreamEncrypter(w io.Writer, kp *keypair.RsaKeyPair) io.WriteCloser
func NewStreamSigner ¶
func NewStreamSigner(w io.Writer, kp *keypair.RsaKeyPair) io.WriteCloser
func NewStreamVerifier ¶
func NewStreamVerifier(r io.Reader, kp *keypair.RsaKeyPair) io.WriteCloser
Types ¶
type DecryptError ¶
type DecryptError struct {
Err error
}
func (DecryptError) Error ¶
func (e DecryptError) Error() string
type EncryptError ¶
type EncryptError struct {
Err error
}
func (EncryptError) Error ¶
func (e EncryptError) Error() string
type StdDecrypter ¶
type StdDecrypter struct {
Error error // Error field for storing decryption errors
// contains filtered or unexported fields
}
func NewStdDecrypter ¶
func NewStdDecrypter(kp *keypair.RsaKeyPair) *StdDecrypter
func (*StdDecrypter) Decrypt ¶
func (d *StdDecrypter) Decrypt(src []byte) (dst []byte, err error)
type StdEncrypter ¶
type StdEncrypter struct {
Error error
// contains filtered or unexported fields
}
func NewStdEncrypter ¶
func NewStdEncrypter(kp *keypair.RsaKeyPair) *StdEncrypter
func (*StdEncrypter) Encrypt ¶
func (e *StdEncrypter) Encrypt(src []byte) (dst []byte, err error)
type StdSigner ¶
type StdSigner struct {
Error error // Error field for storing signature errors
// contains filtered or unexported fields
}
func NewStdSigner ¶
func NewStdSigner(kp *keypair.RsaKeyPair) *StdSigner
type StdVerifier ¶
type StdVerifier struct {
Error error // Error field for storing verification errors
// contains filtered or unexported fields
}
func NewStdVerifier ¶
func NewStdVerifier(kp *keypair.RsaKeyPair) *StdVerifier
func (*StdVerifier) Verify ¶
func (v *StdVerifier) Verify(src, sign []byte) (valid bool, err error)
type StreamDecrypter ¶
type StreamDecrypter struct {
Error error // Error field for storing decryption errors
// contains filtered or unexported fields
}
func (*StreamDecrypter) Read ¶
func (d *StreamDecrypter) Read(p []byte) (n int, err error)
type StreamEncrypter ¶
type StreamEncrypter struct {
Error error // Error field for storing encryption errors
// contains filtered or unexported fields
}
func (*StreamEncrypter) Close ¶
func (e *StreamEncrypter) Close() error
func (*StreamEncrypter) Write ¶
func (e *StreamEncrypter) Write(p []byte) (n int, err error)
type StreamSigner ¶
type StreamSigner struct {
Error error // Error field for storing signature errors
// contains filtered or unexported fields
}
func (*StreamSigner) Close ¶
func (s *StreamSigner) Close() error
func (*StreamSigner) Write ¶
func (s *StreamSigner) Write(p []byte) (n int, err error)
type StreamVerifier ¶
type StreamVerifier struct {
Error error // Error field for storing verification errors
// contains filtered or unexported fields
}
func (*StreamVerifier) Close ¶
func (v *StreamVerifier) Close() error
Close performs the final verification and closes the verifier
func (*StreamVerifier) Write ¶
func (v *StreamVerifier) Write(p []byte) (n int, err error)
Write processes data through the hash function for streaming verification
type VerifyError ¶
type VerifyError struct {
Err error
}
func (VerifyError) Error ¶
func (e VerifyError) Error() string
Source Files
¶
- errors.go
- rsa.go
Click to show internal directories.
Click to hide internal directories.