public static boolean isPotentiallyEncryptedString ( String string ) { checkNotNull ( string , "string" ) ; // String is base64 encoded byte [ ] encryptedBytes ; try { encryptedBytes = BaseEncoding . base64 ( ) . omitPadding ( ) . decode ( string ) ; } catch ( IllegalArgumentException e ) { return false ; } return isPotentiallyEncryptedBytes ( encryptedBytes ) ; }
Returns true if the provided String _could_ be encrypted credentials even if it can t be decrypted by a specific instance .