Example usage for org.bouncycastle.util Pack longToLittleEndian

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

Introduction

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

Prototype

public static void longToLittleEndian(long[] ns, 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;// w ww  . j  a  v  a2s. c om

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