Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ActiveState/code
/ totient
Function
totient
recipes/Python/572196_RSA/recipe-572196.py:106–108 ·
view source on GitHub ↗
(p,q)
Source
from the content-addressed store, hash-verified
104
return
egcd(e,n)[0]%n
105
106
def
totient(p,q):
107
# Calculates the totient of pq
108
return
(p-1)*(q-1)
109
110
def
passwordToPrimePair(pswd,bits=64):
111
assert 64<=bits
Callers
1
passwordToKey
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected