|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.clazzes.optional.sec.rsa.OAEP
public class OAEP
OAEP algorithm as defined in Section 7.1 of RFC 3447.
Constructor Summary | |
---|---|
OAEP(Digest digest,
MGF mgf,
RandomGenerator randomGenerator)
|
Method Summary | |
---|---|
int |
decrypt(byte[] in,
int keyLen,
byte[] label,
byte[] out,
int outOff)
Prepare the given input data for RSA encryption. |
int |
decryptRSA(byte[] in,
RSAPrivKey privKey,
byte[] label,
byte[] out,
int outOff)
Decrypt and unpad the given input data using RSA decryption. |
void |
encrypt(byte[] in,
int inOff,
int inLen,
byte[] label,
byte[] out)
Prepare the given input data for RSA encryption. |
byte[] |
encryptRSA(byte[] in,
int inOff,
int inLen,
RSAPubKey pubKey,
byte[] label)
Pad an encrypt the given input data using RSA encryption. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OAEP(Digest digest, MGF mgf, RandomGenerator randomGenerator)
Method Detail |
---|
public void encrypt(byte[] in, int inOff, int inLen, byte[] label, byte[] out)
in
- The input bufferinOff
- The offset of the data to be encrypted.inLen
- The length of the data to be encrypted.label
- The encryption label used as additional seed material.out
- The output buffer. The length of the output buffer is the
size of the RSA modulus used.public byte[] encryptRSA(byte[] in, int inOff, int inLen, RSAPubKey pubKey, byte[] label)
in
- The input bufferinOff
- The offset of the data to be encrypted.inLen
- The length of the data to be encrypted.pubKey
- The RSA public key used to encrypt.label
- The encryption label used as additional seed material.public int decrypt(byte[] in, int keyLen, byte[] label, byte[] out, int outOff)
in
- The input buffer, which not longer than keyLen
.keyLen
- The length of the RSA modulus. THe length of in
may be less than keyLen
, because in
is the magnitude of a big integer, which might have contained
leading zero bytes. Hence, if in
is shorter than
keyLen
, the missing parts are interpreted as
leading zero bytes.label
- The encryption label used as additional seed material.out
- The output buffer. The length of the output buffer must be at least
the size of the RSA modulus used.outOff
- The offset at which the result is stored in out
.
out
.public int decryptRSA(byte[] in, RSAPrivKey privKey, byte[] label, byte[] out, int outOff)
in
- The input buffer, which not longer than keyLen
.privKey
- The RAS private key used for the plain RSA operation.label
- The encryption label used as additional seed material.out
- The output buffer. The length of the output buffer must be at least
the size of the RSA modulus used.outOff
- The offset at which the result is stored in out
.
out
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |