- The card needs to have
intsupport - The card needs to support the
javacardx.framework.util.intxpackage - The input message is 32 bytes
- The key is 32 bytes
- The output message is 32 bytes
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/env python3 | |
| # -*- coding: utf-8 -*- | |
| ########################################################################### | |
| # This is free and unencumbered software released into the public domain. # | |
| # # | |
| # Anyone is free to copy, modify, publish, use, compile, sell, or # | |
| # distribute this software, either in source code form or as a compiled # | |
| # binary, for any purpose, commercial or non-commercial, and by any # | |
| # means. # |
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
| {% extends "base.html" %} | |
| {% block body %} | |
| <h1>{{ icon('shopping-cart') }} Produits</h1> | |
| <dl class="sub-nav"> | |
| <dd class="active"><a href="/products/view">{{ icon('info') }} lister</a></dd> | |
| <dd><a href="/products/add">{{ icon('fi-plus') }} ajouter</a></dd> | |
| </dl> | |
| <hr /> | |
| <div class="panel radius"> |
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
| def split(txt, target): | |
| # split according to \n in text | |
| # split in 512 bytes (and be careful not to split in the middle of a UTF-8 control code) | |
| final_text = [] | |
| for i in txt.split('\n'): | |
| if len(i.encode())+11+len(target) >= 512: | |
| s = i.encode() | |
| splitted = [] | |
| cursor = 512-11-len(target) | |
| while ''.join(j.decode() for j in splitted) != i: |
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 | |
| #!/usr/bin/python3.3 | |
| # -*- coding: utf-8 -*- | |
| from functions_core import Function | |
| from core import ToSend | |
| @Function('ping') | |
| def ping(cmd, args, source, target): | |
| return ToSend(target, 'pong') |
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
| [actions] | |
| ciggin = {name} lights up a cigarette.;{names} are smokin cigs. | |
| smokin = Puff puff! Another toke for {name};Puff puff! Another toke for {names} | |
| trippin = {name} is seeing sounds and hearing colors.;{names} are trippin' balls! | |
| poopin = {name} is poopin'.;{names} are poopin'. | |
| jenkin = {name} is huffing that sweet sweet poo gas.;{names} are jenked up on jenkem! | |
| snortin = {name} is insufflating all sorts of crazy shit into his or her nose!;{names} are doin' lines! | |
| dexxin = {name} is sippin' that syrup.;{names} are sippin' that syrup. | |
| nommin = {name} is a fatty!;{names} are fatties! | |
| shootin = {name} is cookin up.;{names} are cookin up. |
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 |
NewerOlder