This file contains 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
package storage; | |
/** | |
* Ekstern lagring i bucket | |
* | |
* @author Joakim Bjørnstad | |
*/ | |
public interface BucketStorage { | |
/** | |
* Krypterer og laster opp objekt til Cloud Storage. |
This file contains 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
{4.99, 5.02173, 5.05346, 5.08519, 5.11691, 5.14864, 5.18037, 5.2121, 5.24383, 5.27555, 5.30728, 5.33901, 5.37073, 5.40246, 5.43419, 5.46591, 5.49764, 5.52936, 5.56109, 5.59281, 5.62454, 5.65626, 5.68798, 5.7197, 5.75142, 5.78315, 5.81487, 5.84659, 5.8783, 5.91002, 5.94174, 5.97346, 6.00517, 6.03689, 6.0686, 6.10031, 6.13203, 6.16374, 6.19545, 6.22716, 6.25887, 6.29058, 6.32228, 6.35399, 6.38569, 6.41739, 6.4491, 6.4808, 6.5125, 6.5442, 6.57589, 6.60759, 6.63928, 6.67098, 6.70267, 6.73436, 6.76605, 6.79774, 6.82943, 6.86111, 6.89279, 6.92448, 6.95616, 6.98783, 7.01951, 7.05119, 7.08286, 7.11453, 7.1462, 7.17787, 7.20954, 7.24121, 7.27287, 7.30453, 7.33619, 7.36785, 7.39951, 7.43116, 7.46281, 7.49446, 7.52611, 7.55776, 7.5894, 7.62104, 7.65268, 7.68432, 7.71596, 7.74759, 7.77922, 7.81085, 7.84248, 7.8741, 7.90573, 7.93735, 7.96896, 8.00058, 8.03219, 8.0638, 8.09541, 8.12702, 8.15862, 8.19022, 8.22182, 8.25341, 8.28501, 8.3166, 8.34818, 8.37977, 8.41135, 8.44293, 8.47451, 8.50608, 8.53765, 8.56922, 8.60079, 8.63 |
This file contains 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
import os, sys, png, argparse | |
#coding: utf-8 | |
""" | |
Contains an implementation of the Least Significant Bit algorithm for steganography. | |
Hides a png image (payload) in the n lowest bits of another png image(carrier), resulting in contaminated image called the package. | |
""" |
This file contains 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 | |
import string | |
from collections import Counter | |
from pprint import pprint | |
def split_word_by_length(word, length): | |
return [word[i:i+length] for i in range(0, len(word), length)] | |
def create_bigrams(sentence): |
This file contains 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
import re | |
def to_ascii(string): | |
return chr(int(string)) | |
def main(): | |
cipher = '83766567758765826932767378858832738332658769837977693265786832837932738332786984668368' | |
matches = re.findall('..?', cipher) | |
chars = map(to_ascii, matches) |
This file contains 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
import sys, string | |
def caesar_decode(x, substitution): | |
transtable = string.maketrans('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz', ''.join(substitution)) | |
return x.translate(transtable) | |
def rotateRight(substitution): | |
return (substitution[0][-1] + substitution[0][:-1], substitution[1][-1] + substitution[1][:-1]) | |
def main(): |
This file contains 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
import sys, string | |
def rot13(x): | |
transtable = string.maketrans('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz','NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm') | |
return x.translate(transtable) | |
def main(): | |
cipher = 'Qh re xnafxwr zhyvtraf ra ivaare' | |
print rot13(cipher) |