Пример #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));
            }
Пример #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);
        }
Пример #3
0
 public FpeCharDecryptor(FpeEngine fpeEngine, byte[] key, char[] alphabet) : this(fpeEngine, key, new byte[0], alphabet)
 {
 }