Here you can find the source of rotateRight(byte[] input)
public static byte[] rotateRight(byte[] input)
//package com.java2s; public class Main { /**// w w w . ja v a 2 s.c om * Moves all bytes one down, meaning the right most byte (length-1) is swapped to the beginning */ public static byte[] rotateRight(byte[] input) { byte[] cycled = new byte[input.length]; System.arraycopy(input, 0, cycled, 1, input.length - 1); cycled[0] = input[input.length - 1]; return cycled; } }