Class EncryptionProviderImpl

    • Constructor Detail

      • EncryptionProviderImpl

        public EncryptionProviderImpl​(EncryptionService aEncryptionService)
        Constructs the EncryptionProvider using AES as implemented by the BouncyCastleProvider.
        Parameters:
        aEncryptionService - The service to be used by the provider.
    • Method Detail

      • toEncrypted

        public String toEncrypted​(String aInput)
                           throws org.refcodes.security.EncryptionException
        Specified by:
        toEncrypted in interface org.refcodes.security.Encrypter<String,String,org.refcodes.security.EncryptionException>
        Specified by:
        toEncrypted in interface EncryptionProvider
        Throws:
        org.refcodes.security.EncryptionException
      • toEncrypted

        public int toEncrypted​(byte[] aInput,
                               int aInputOffset,
                               int aInputLength,
                               byte[] aOutput,
                               int aOutputOffset)
                        throws ShortBufferException,
                               org.refcodes.security.EncryptionException
        Specified by:
        toEncrypted in interface org.refcodes.security.Encrypter<String,String,org.refcodes.security.EncryptionException>
        Throws:
        ShortBufferException
        org.refcodes.security.EncryptionException
      • nextCipherVersion

        public void nextCipherVersion​()
        Forces a next valid cipher to be requested and used.
        Specified by:
        nextCipherVersion in interface EncryptionProvider