COM.claymoresystems.crypto

Class PKCS1Pad


public class PKCS1Pad
extends java.lang.Object

Implement PKCS1 padding

Field Summary

static int
DECRYPT
static int
ENCRYPT
static int
SIGN
static int
VERIFY

Method Summary

static byte[]
pkcs1PadBuf(SecureRandom rnd, byte[] input, BigInteger modulus, int how)
static byte[]
pkcs1PadBuf(SecureRandom rnd, byte[] input, PublicKey key)
Pad a buffer for encryption with this public key
static byte[]
pkcs1PadBuf(byte[] input, BigInteger modulus, int how)
static byte[]
pkcs1PadBuf(byte[] input, PrivateKey key)
static byte[]
pkcs1UnpadBuf(byte[] input, int how, BigInteger modulus)
static byte[]
pkcs1UnpadBuf(byte[] input, int how, CryptixRSAPrivateKey key)

Field Details

DECRYPT

public static final int DECRYPT

Field Value:
1


ENCRYPT

public static final int ENCRYPT

Field Value:
1


SIGN

public static final int SIGN

Field Value:
2


VERIFY

public static final int VERIFY

Field Value:
2

Method Details

pkcs1PadBuf

public static byte[] pkcs1PadBuf(SecureRandom rnd,
                                 byte[] input,
                                 BigInteger modulus,
                                 int how)


pkcs1PadBuf

public static byte[] pkcs1PadBuf(SecureRandom rnd,
                                 byte[] input,
                                 PublicKey key)
Pad a buffer for encryption with this public key


pkcs1PadBuf

public static byte[] pkcs1PadBuf(byte[] input,
                                 BigInteger modulus,
                                 int how)


pkcs1PadBuf

public static byte[] pkcs1PadBuf(byte[] input,
                                 PrivateKey key)


pkcs1UnpadBuf

public static byte[] pkcs1UnpadBuf(byte[] input,
                                   int how,
                                   BigInteger modulus)


pkcs1UnpadBuf

public static byte[] pkcs1UnpadBuf(byte[] input,
                                   int how,
                                   CryptixRSAPrivateKey key)


Copyright (c) 1999-2001 Claymore Systems, Inc., All Rights Reserved.