Tabnine Logo
com.ociweb.pronghorn.stage.encrypt
Code IndexAdd Tabnine to your IDE (free)

How to use com.ociweb.pronghorn.stage.encrypt

Best Java code snippets using com.ociweb.pronghorn.stage.encrypt (Showing top 17 results out of 315)

origin: oci-pronghorn/Pronghorn

public RawDataCryptAESCBCPKCS5Stage(GraphManager graphManager, 
                   byte[] pass,
                   boolean encrypt,
                   Pipe<RawDataSchema> input, 
                   Pipe<RawDataSchema> output,
                   //both decrypt and encrypt instances must point to same file
                   Pipe<BlockStorageReceiveSchema> finalInput,
                   Pipe<BlockStorageXmitSchema> finalOutput
                  ) {
  super(graphManager, join(input, finalInput), join(output, finalOutput));
  if (pass.length!=passSize) {
    throw new UnsupportedOperationException("pass must be "+passSize+" bytes");
  }
  this.encrypt = encrypt;
  this.pass = pass;
  this.input = input;
  this.output = output;
  this.finalInput = finalInput;
  this.finalOutput = finalOutput;
}
origin: oci-pronghorn/GreenLightning

@Override
public void useSerialStores(int instances, int largestBlock, byte[] passphrase) {
  
  SecureRandom sr = new SecureRandom(passphrase);	
  NoiseProducer noiseProducer = new NoiseProducer(sr);
      
  serialStoreReleaseAck = new Pipe[instances];
  serialStoreReplay = new Pipe[instances];
  serialStoreWriteAck = new Pipe[instances];
  serialStoreRequestReplay = new Pipe[instances];
  serialStoreWrite = new Pipe[instances];
  
  for(int j=0; j<instances; j++) {					
    buildSerialStore(j, noiseProducer, largestBlock, SequentialReplayerImpl.File);
  }
}
origin: oci-pronghorn/Pronghorn

if (encrypt) {
  hashInputData(availBacking, availPos, Integer.MAX_VALUE, avail);
      hashInputData(targetBacking, targetPos, targetMask, result);	
      publishDoFinal();
origin: oci-pronghorn/Pronghorn

int blockLen = processBlock(finalLen, 0, finalData, targetPos, targetBuffer, targetMask);
int finalLen2 = doFinalIntoRing(targetBuffer, targetPos+blockLen, targetMask);
hashInputData(targetBuffer, targetPos+blockLen, targetMask, finalLen2);
  int targetLen = blockLen + finalLen2;
  publishBockOut(targetPos, targetLen);
resetToBeginning();
origin: oci-pronghorn/Pronghorn

       requestShutdown();
processFinalInputResponse();
while (processAvail()) {}	
          while (processAvail()){}
            resetToBeginning();
          Pipe.readNextWithoutReleasingReadLock(input);
          while (processAvail()){}
origin: oci-pronghorn/Pronghorn

byte[] cypherBlock = noiseProducer.nextCypherBlock();
RawDataCryptAESCBCPKCS5Stage crypt1 = new RawDataCryptAESCBCPKCS5Stage(gm, 
    cypherBlock, true, cypherDataToSave[i], fileDataToSave[i],
             doFinalReceive1, doFinalXmit1);
RawDataCryptAESCBCPKCS5Stage crypt2 = new RawDataCryptAESCBCPKCS5Stage(gm, 
    cypherBlock, false, fileDataToLoad[i], cypherDataToLoad[i],
             doFinalReceive2, doFinalXmit2);
origin: oci-pronghorn/Pronghorn

private ConsoleJSONDumpStage buildGraph2(String blockFilePath, File tempFile, StringBuilder results,
    GraphManager gm2) {
  Pipe<RawDataSchema> encryptedDataPipe2 = RawDataSchema.instance.newPipe(10, 1000);
  Pipe<RawDataSchema> resultDataPipe2 = RawDataSchema.instance.newPipe(10, 1000);
      
  Pipe<BlockStorageReceiveSchema> doFinalInput3 = BlockStorageReceiveSchema.instance.newPipe(10, 1000);
  Pipe<BlockStorageXmitSchema> doFinalOutput3 = BlockStorageXmitSchema.instance.newPipe(10, 1000);
  
  BlockStorageStage.newInstance(gm2, blockFilePath, doFinalOutput3, doFinalInput3);
      
  results.setLength(0);
  results.append("single large message: ");
  
  FileBlobReadStage read= new FileBlobReadStage(gm2, encryptedDataPipe2, tempFile.getAbsolutePath());
  RawDataCryptAESCBCPKCS5Stage decrypt2 = new  RawDataCryptAESCBCPKCS5Stage(gm2, pass, false,
                                       encryptedDataPipe2, resultDataPipe2,
                                       doFinalInput3, doFinalOutput3
                            );
  
  ConsoleJSONDumpStage lastStage2 = ConsoleJSONDumpStage.newInstance(gm2, resultDataPipe2, results, true);
  return lastStage2;
}
origin: oci-pronghorn/Pronghorn

int finalMask = finalOutput.blobMask;
int finalLength = doFinalIntoRing(blob, finalOffset, finalMask);
hashInputData(targetBuffer, finalOffset, targetMask, finalLength);
origin: oci-pronghorn/Pronghorn

runTestOfDualPath(testDataPipe, expected);
origin: oci-pronghorn/Pronghorn

noiseProducer.writeNoise(str, blockId, str.getPipe().maxVarLen-realDataSize);			
origin: oci-pronghorn/GreenLightning

@Override
public void useSerialStores(int instances, int largestBlock, String passphrase) {
    
  CharSequenceToUTF8 charSequenceToUTF8 = CharSequenceToUTF8Local.get();
  SecureRandom sr = new SecureRandom(charSequenceToUTF8.convert(passphrase).asBytes());
  charSequenceToUTF8.clear();
  NoiseProducer noiseProducer = new NoiseProducer(sr);
      
  serialStoreReleaseAck = new Pipe[instances];
  serialStoreReplay = new Pipe[instances];
  serialStoreWriteAck = new Pipe[instances];
  serialStoreRequestReplay = new Pipe[instances];
  serialStoreWrite = new Pipe[instances];
  
  int j = instances;
  while (--j>=0) {					
    buildSerialStore(j, noiseProducer, largestBlock, SequentialReplayerImpl.File);
  }
}

origin: oci-pronghorn/Pronghorn

               new Pipe[]{doFinalInput1,doFinalInput2});
new  RawDataCryptAESCBCPKCS5Stage(gm, pass, true, 
                                    testDataPipe, 
                                    encryptedDataPipe,
new  RawDataCryptAESCBCPKCS5Stage(gm, pass, false, 
                                     encryptedDataPipeB, 
                                     resultDataPipe,
origin: oci-pronghorn/Pronghorn

};
runTestOfDualPath(testDataPipe, expected);
origin: oci-pronghorn/Pronghorn

np = new NoiseProducer(new SecureRandom("seed".getBytes()));
origin: oci-pronghorn/Pronghorn

};
runTestOfDualPath(testDataPipe, expected);
origin: oci-pronghorn/Pronghorn

SecureRandom sr = new SecureRandom(charSequenceToUTF8.convert(username).append(":").append(password).asBytes());
charSequenceToUTF8.clear();
noiseProducer = new NoiseProducer(sr);
origin: oci-pronghorn/Pronghorn

};
runTestOfDualPath(testDataPipe, expected);
com.ociweb.pronghorn.stage.encrypt

Most used classes

  • NoiseProducer
  • RawDataCryptAESCBCPKCS5Stage
    _no-docs_
  • AESCBSRoundTripEncryptionTest
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now