I want to created a rsa key put want to return single key at a time for models

def Create_Keys(): publicKey, privateKey = rsa.newkeys(512)

For Models

PublicKey = models.CharField(max_length=1000, blank=True, default=#From Function create Keys publicKey)
PrivateKey = models.CharField(max_length=1500, blank=True, default=#From Function create Keys privateKey)

To make Like this hidden_url = models.CharField(max_length=20, blank=True, default=utlis.create_random_codes())

Back to Top