Codota Logo
Salsa20Engine.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.spongycastle.crypto.engines.Salsa20Engine
constructor

Best Java code snippets using org.spongycastle.crypto.engines.Salsa20Engine.<init> (Showing top 4 results out of 315)

  • Common ways to obtain Salsa20Engine
private void myMethod () {
Salsa20Engine s =
  • Codota Iconnew Salsa20Engine()
  • Smart code suggestions by Codota
}
origin: com.madgag.spongycastle/prov

  public Base()
  {
    super(new Salsa20Engine(), 8);
  }
}
origin: com.madgag/scprov-jdk15on

  public Base()
  {
    super(new Salsa20Engine(), 8);
  }
}
origin: jorabin/KeePassJava2

/**
 * Creates a Salsa20 engine
 *
 * @param key the key to use
 * @return an initialized Salsa20 engine
 */
@SuppressWarnings("WeakerAccess")
public static Salsa20Engine createSalsa20(byte[] key) {
  MessageDigest md = Encryption.getMessageDigestInstance();
  KeyParameter keyParameter = new KeyParameter(md.digest(key));
  ParametersWithIV ivParameter = new ParametersWithIV(keyParameter, SALSA20_IV);
  Salsa20Engine engine = new Salsa20Engine();
  engine.init(true, ivParameter);
  return engine;
}
origin: cternes/openkeepass

private void initialize(byte[] protectedStreamKey) {
  byte[] salsaKey = Sha256.hash(protectedStreamKey);
  try {
    salsa20Engine = new Salsa20Engine();
    salsa20Engine.init(true, new ParametersWithIV(new KeyParameter(salsaKey), Hex.decode(SALSA20IV)));
  } catch (Exception e) {
    throw new UnsupportedOperationException("Could not find provider '" + SALSA20_ALGORITHM + "'", e);
  }
}
org.spongycastle.crypto.enginesSalsa20Engine<init>

Javadoc

Creates a 20 round Salsa20 engine.

Popular methods of Salsa20Engine

  • salsaCore
    Salsa20 function
  • generateKeyStream
  • getAlgorithmName
  • init
    initialise a Salsa20 cipher.
  • limitExceeded
  • processBytes
  • resetCounter
  • rotl
    Rotate left
  • setKey
  • advanceCounter
  • getCounter
  • getNonceSize
  • getCounter,
  • getNonceSize,
  • reset,
  • resetLimitCounter,
  • retreatCounter,
  • skip

Popular in Java

  • Finding current android device location
  • runOnUiThread (Activity)
  • getApplicationContext (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • ImageIO (javax.imageio)
  • JPanel (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now