Example #1
0
            public FpeCharDecryptor(FpeEngine fpeEngine, byte[] key, byte[] tweak, char[] alphabet)
            {
                this.fpeEngine = fpeEngine;

                alphabetMapper = new BasicAlphabetMapper(alphabet);

                fpeEngine.Init(false, new FpeParameters(new KeyParameter(key), alphabetMapper.Radix, tweak));
            }
Example #2
0
        private byte[] process(FpeEngine fpeEngine, byte[] bytes)
        {
            byte[] rv = new byte[bytes.Length];

            fpeEngine.ProcessBlock(bytes, 0, bytes.Length, rv, 0);

            return(rv);
        }
Example #3
0
 public FpeCharDecryptor(FpeEngine fpeEngine, byte[] key, char[] alphabet) : this(fpeEngine, key, new byte[0], alphabet)
 {
 }