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
public ByteString encrypt(ByteString input){ | |
System.out.println("Encrypting..."); | |
try { | |
Object lunaSlotManager = Class.forName("com.safenetinc.luna.LunaSlotManager").getDeclaredMethod("getInstance").invoke(null); | |
lunaSlotManager.getClass().getMethod("login", String.class, String.class).invoke(lunaSlotManager, PARITION_NAME, PARITION_PASSWORD); | |
Provider provider = (Provider) Class.forName("com.safenetinc.luna.provider.LunaProvider").newInstance(); | |
Security.addProvider(provider); | |
Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding", provider); |
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
if [ "$#" -ne 2 ]; then | |
echo "Usage: bump_version <version_number> <message>" | |
exit 1 | |
fi | |
VERSION=$1 | |
MESSAGE=$2 | |
# Update package.json | |
sed -i '' "s/\"version\": \"[[:digit:]]*.[[:digit:]]*.[[:digit:]]*\"/\"version\": \"${VERSION}\"/g" package.json |
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
if [ -z "$1" ] | |
then | |
echo "Usage: create_credentials.sh <number_of_credentials>" | |
exit 1 | |
fi | |
for i in `seq 1 $1`; | |
do | |
name=$(openssl rand -base64 32 | tr -d /=+ | cut -c -16) | |
credhub generate -t password -n $name |
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
Hi! |
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
import java.io.*; | |
import java.util.*; | |
class Solution { | |
public static void main(String... args){ | |
System.out.println("Coding a Binary Search Tree"); | |
int[] original = {100, 113, 110, 85, 105, 102, 86, 63, 81, 101, 94, 106, | |
101, 79, 94, 90, 97}; |
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
import java.io.*; | |
import java.util.*; | |
class Solution { | |
public static void main(String[] args) { | |
int[] original = {100, 113, 110, 85, 105, 102, 86, 63, 81, 101, 94, 106, | |
101, 79, 94, 90, 97}; | |
int[] input = null; |
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
import java.io.*; | |
import java.util.*; | |
class Solution { | |
public static void main(String[] args) { | |
Test test = new Test(); | |
test.runTests(); | |
} | |
} |
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
import java.io.*; | |
import java.util.*; | |
class Solution { | |
public static void main(String[] args) { | |
Test test = new Test(); | |
test.runTests(); | |
} | |
} |
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
import java.io.*; | |
import java.util.*; | |
class Solution { | |
public static void main(String[] args) { | |
Test test = new Test(); | |
test.runTests(); | |
} | |
} |
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
package us.kardol.datastructure; | |
/** | |
* Created by Guillermo Kardolus on 2/24/16. | |
*/ | |
public class Set { | |
private int size = 0; | |
private int capacity = 4; | |
private Object[] elements = new Object[capacity]; |