public class MyRSA
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
(package private) mybouncycastle.org.bouncycastle.crypto.encodings.OAEPEncoding |
m_OAEP |
(package private) mybouncycastle.org.bouncycastle.crypto.encodings.PKCS1Encoding |
m_PKCS1 |
(package private) mybouncycastle.org.bouncycastle.crypto.engines.RSAEngine |
m_RSAEngine |
Constructor and Description |
---|
MyRSA() |
MyRSA(mybouncycastle.org.bouncycastle.crypto.Digest digest) |
Modifier and Type | Method and Description |
---|---|
void |
init(MyRSAPrivateKey key)
inits the cipher for decryption
|
void |
init(MyRSAPublicKey key)
inits the cipher for encryption
|
byte[] |
processBlock(byte[] plain,
int offset,
int len)
encrypts/decrypts one block using Plain RSA
|
byte[] |
processBlockOAEP(byte[] plain,
int offset,
int len)
encrypts/decrypts one block using OAEP padding
|
byte[] |
processBlockPKCS1(byte[] plain,
int offset,
int len)
encrypts/decrypts one block using PKCS1 padding
|
mybouncycastle.org.bouncycastle.crypto.engines.RSAEngine m_RSAEngine
mybouncycastle.org.bouncycastle.crypto.encodings.OAEPEncoding m_OAEP
mybouncycastle.org.bouncycastle.crypto.encodings.PKCS1Encoding m_PKCS1
public MyRSA()
public MyRSA(mybouncycastle.org.bouncycastle.crypto.Digest digest)
public void init(MyRSAPublicKey key) throws java.lang.Exception
java.lang.Exception
public void init(MyRSAPrivateKey key) throws java.lang.Exception
java.lang.Exception
public byte[] processBlock(byte[] plain, int offset, int len) throws java.lang.Exception
java.lang.Exception
public byte[] processBlockOAEP(byte[] plain, int offset, int len) throws java.lang.Exception
java.lang.Exception
public byte[] processBlockPKCS1(byte[] plain, int offset, int len) throws java.lang.Exception
java.lang.Exception
Copyright © 2023. All rights reserved.