encryptDecryptInt encrypts or decrypts the data using RSA algorithm
(e, n, data uint64)
| 106 | |
| 107 | // encryptDecryptInt encrypts or decrypts the data using RSA algorithm |
| 108 | func encryptDecryptInt(e, n, data uint64) uint64 { |
| 109 | pow := new(big.Int).Exp(big.NewInt(int64(data)), big.NewInt(int64(e)), big.NewInt(int64(n))) |
| 110 | return pow.Uint64() |
| 111 | } |
| 112 | |
| 113 | // randomPrime returns two random prime numbers |
| 114 | func randomPrime() (uint64, uint64) { |
no outgoing calls
no test coverage detected