go-libp2p-core/crypto/rsa_common.go

20 lines
732 B
Go
Raw Normal View History

package crypto
import (
2022-08-18 23:54:48 +08:00
"github.com/libp2p/go-libp2p/core/crypto"
)
// WeakRsaKeyEnv is an environment variable which, when set, lowers the
// minimum required bits of RSA keys to 512. This should be used exclusively in
// test situations.
2022-08-18 23:54:48 +08:00
// Deprecated: use github.com/libp2p/go-libp2p/core/crypto.WeakRsaKeyEnv instead
const WeakRsaKeyEnv = crypto.WeakRsaKeyEnv
2022-08-18 23:54:48 +08:00
// Deprecated: use github.com/libp2p/go-libp2p/core/crypto.MinRsaKeyBits instead
var MinRsaKeyBits = crypto.MinRsaKeyBits
// ErrRsaKeyTooSmall is returned when trying to generate or parse an RSA key
// that's smaller than MinRsaKeyBits bits. In test
2022-08-18 23:54:48 +08:00
// Deprecated: use github.com/libp2p/go-libp2p/core/crypto.ErrRsaKeyTooSmall instead
var ErrRsaKeyTooSmall error