static boolean memequal ( byte [ ] b1 , byte [ ] b2 , int len ) { if ( b1 == b2 ) return true ; if ( b1 == null || b2 == null ) return false ; if ( b1 . length < len || b2 . length < len ) return false ; for ( int i = 0 ; i < len ; i ++ ) { if ( b1 [ i ] != b2 [ i ] ) return false ; } return true ; }
Not quite memcmp