public class EncryptionProviderImpl extends Object implements EncryptionProvider
EncryptionProvider
interface.Constructor and Description |
---|
EncryptionProviderImpl(EncryptionService aEncryptionService)
Constructs the
EncryptionProvider using AES as implemented by the
BouncyCastleProvider . |
EncryptionProviderImpl(EncryptionService aEncryptionService,
Provider aJceProvider,
String aJceAlgorithm)
Constructs the
EncryptionProvider with the given
EncryptionService and with the specified JCE Provider as
well as the according JCE algorithm. |
Modifier and Type | Method and Description |
---|---|
void |
nextCipherVersion()
Forces a next valid cipher to be requested and used.
|
int |
toEncrypted(byte[] aInput,
int aInputOffset,
int aInputLength,
byte[] aOutput,
int aOutputOffset) |
String |
toEncrypted(String aInput) |
public EncryptionProviderImpl(EncryptionService aEncryptionService, Provider aJceProvider, String aJceAlgorithm)
EncryptionProvider
with the given
EncryptionService
and with the specified JCE Provider
as
well as the according JCE algorithm.aEncryptionService
- The EncryptionService
to be used by the
provider.aJceProvider
- The JCE Provider
to be used.aJceAlgorithm
- the JCE algorithm to be used by the JCE
Provider
.public EncryptionProviderImpl(EncryptionService aEncryptionService)
EncryptionProvider
using AES as implemented by the
BouncyCastleProvider
.aEncryptionService
- The service to be used by the provider.public String toEncrypted(String aInput) throws org.refcodes.security.EncryptionException
toEncrypted
in interface EncryptionProvider
toEncrypted
in interface org.refcodes.security.Encrypter<String,String,org.refcodes.security.EncryptionException>
org.refcodes.security.EncryptionException
public int toEncrypted(byte[] aInput, int aInputOffset, int aInputLength, byte[] aOutput, int aOutputOffset) throws ShortBufferException, org.refcodes.security.EncryptionException
toEncrypted
in interface org.refcodes.security.Encrypter<String,String,org.refcodes.security.EncryptionException>
ShortBufferException
org.refcodes.security.EncryptionException
public void nextCipherVersion()
nextCipherVersion
in interface EncryptionProvider
Copyright © 2017. All rights reserved.