Example usage for org.bouncycastle.util Pack littleEndianToLong

List of usage examples for org.bouncycastle.util Pack littleEndianToLong

Introduction

In this page you can find the example usage for org.bouncycastle.util Pack littleEndianToLong.

Prototype

public static long littleEndianToLong(byte[] bs, int off) 

Source Link

Usage

From source file:com.github.horrorho.inflatabledonkey.crypto.xts.XTSTweak.java

License:Open Source License

XTSTweak next() {
    long lo = Pack.littleEndianToLong(tweak, 0);
    long hi = Pack.littleEndianToLong(tweak, 8);

    long fdbk = (hi & MSB) == 0 ? 0L : FDBK;

    hi = (hi << 1) | (lo >>> 63);
    lo = (lo << 1) ^ fdbk;//from   w  ww.j ava  2s.  c o  m

    Pack.longToLittleEndian(lo, tweak, 0);
    Pack.longToLittleEndian(hi, tweak, 8);
    return this;
}