func encryptRSA(pubkey []byte, message []byte) []byte {

	// crypto/rand.Reader is a good source of entropy for randomizing the
	// encryption function.
	rng := rand.Reader
	rsaPubKey := bytesToPublicRSAKey(pubkey)

	cipherText, err := rsa.EncryptOAEP(sha256.New(), rng, rsaPubKey, message, nil)
	if err != nil {
		log.Fatal(err)
	}

	return cipherText
}
//EncryptRSA encrypts the given message with RSA-OAEP.
EncryptRSA encrypts the given message with RSA-OAEP.
// EncryptRSA encrypts the given message with RSA - OAEP .
func encryptRSA(pubkey []byte, message []byte) []byte {
	rng := rand.Reader
	rsaPubKey := bytesToPublicRSAKey(pubkey)
	cipherText, err := rsa.EncryptOAEP(sha256.New(), rng, rsaPubKey, message, nil)
	if err != nil {
		log.Fatal(err)
	}
	return cipherText
}
func encryptRSA ( pubkey [ ] byte , message [ ] byte ) [ ] byte { rng := rand . Reader rsaPubKey := bytesToPublicRSAKey ( pubkey ) cipherText , err := rsa . EncryptOAEP ( sha256 . New ( ) , rng , rsaPubKey , message , nil ) if err != nil { log . Fatal ( err ) } return cipherText }
EncryptRSA encrypts the given message with RSA-OAEP.
EncryptRSA encrypts the given message with RSA - OAEP .
// crypto/rand.Reader is a good source of entropy for randomizing the // encryption function.