public static boolean isPotentiallyEncryptedBytes ( byte [ ] bytes ) { checkNotNull ( bytes , "bytes" ) ; // The number of bytes is a non-zero multiple of the block size. try { return bytes . length != 0 && bytes . length % Cipher . getInstance ( CIPHER ) . getBlockSize ( ) == 0 ; } catch ( Throwable t ) { // This shouldn't happen since AES is supported by all JVMs. throw Throwables . propagate ( t ) ; } }
Returns true if the provided bytes _could_ be encrypted credentials even if they can t be decrypted by a specific instance .