This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python3.3 | |
| # -*- coding: utf-8 -*- | |
| # core.py | |
| # Functions: | |
| # [X] ToSend object | |
| # [X] loading servers details | |
| # [ ] loading servers config (in which is found username, etc.) | |
| # [ ] logging to disk commands and status | |
| # [ ] loading and providing configuration e.g. is_enabled() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| # functions_core.py | |
| # Elements: | |
| # [X] IRC exceptions | |
| # [X] sandbox function | |
| # [X] function object | |
| import core |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "Jacobi.hpp" | |
| void Jacobi::fac2(uintmax_t n, uintmax_t &a, uintmax_t &b) | |
| { | |
| uintmax_t ret_a = 0; | |
| uintmax_t ret_b = n; | |
| while((ret_b&1) == 0) | |
| { | |
| ret_b = ret_b >> 1; | |
| ret_a++; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python3.3 | |
| # -*- coding: utf-8 -*- | |
| import fractions, random | |
| class RSA: | |
| def __init__(self, p, q, b): | |
| self.p = p | |
| self.q = q | |
| self.n = p*q |