org.bouncycastle.bcpg.SymmetricEncIntegrityPacket Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcpg-jdk14 Show documentation
Show all versions of bcpg-jdk14 Show documentation
The Bouncy Castle Java API for handling the OpenPGP protocol. This jar contains the OpenPGP API for JDK 1.4. The APIs can be used in conjunction with a JCE/JCA provider such as the one provided with the Bouncy Castle Cryptography APIs.
package org.bouncycastle.bcpg;
import java.io.IOException;
/**
* A symmetric key encrypted packet with an associated integrity check code.
*/
public class SymmetricEncIntegrityPacket
extends InputStreamPacket
implements BCPGHeaderObject
{
int version;
SymmetricEncIntegrityPacket(
BCPGInputStream in)
throws IOException
{
super(in);
version = in.read();
}
public SymmetricEncIntegrityPacket()
{
super(null);
version = 1;
}
public int getVersion()
{
return version;
}
public int getType()
{
return SYM_ENC_INTEGRITY_PRO;
}
public void encode(BCPGOutputStream bcpgOut)
throws IOException
{
bcpgOut.write(getVersion());
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy