![JAR search and dependency download from the Maven repository](/logo.png)
nl.open.jwtdependency.org.bouncycastle.crypto.params.TweakableBlockCipherParameters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-jwt-nodependencies Show documentation
Show all versions of java-jwt-nodependencies Show documentation
This is a drop in replacement for the auth0 java-jwt library (see https://github.com/auth0/java-jwt). This jar makes sure there are no external dependencies (e.g. fasterXml, Apacha Commons) needed. This is useful when deploying to an application server (e.g. tomcat with Alfreso or Pega).
The newest version!
package org.bouncycastle.crypto.params;
import org.bouncycastle.crypto.CipherParameters;
import org.bouncycastle.util.Arrays;
/**
* Parameters for tweakable block ciphers.
*/
public class TweakableBlockCipherParameters
implements CipherParameters
{
private final byte[] tweak;
private final KeyParameter key;
public TweakableBlockCipherParameters(final KeyParameter key, final byte[] tweak)
{
this.key = key;
this.tweak = Arrays.clone(tweak);
}
/**
* Gets the key.
*
* @return the key to use, or null
to use the current key.
*/
public KeyParameter getKey()
{
return key;
}
/**
* Gets the tweak value.
*
* @return the tweak to use, or null
to use the current tweak.
*/
public byte[] getTweak()
{
return tweak;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy