crypto/src/main/java/org/springframework/security/crypto/password/LdapShaPasswordEncoder.java
private String extractPrefix(String encPass) {
		if (!encPass.startsWith("{")) {
			return null;
		}

		int secondBrace = encPass.lastIndexOf('}');

		if (secondBrace < 0) {
			throw new IllegalArgumentException(
					"Couldn't find closing brace for SHA prefix");
		}

		return encPass.substring(0, secondBrace + 1);
	}
private String extractPrefix(String encPass) {
		if (!encPass.startsWith("{")) {
			return null;
		}

		int secondBrace = encPass.lastIndexOf('}');

		if (secondBrace < 0) {
			throw new IllegalArgumentException(
					"Couldn't find closing brace for SHA prefix");
		}

		return encPass.substring(0, secondBrace + 1);
	}
private String extractPrefix ( String encPass ) { if ( ! encPass . startsWith ( "{" ) ) { return null ; } int secondBrace = encPass . lastIndexOf ( ' ' ) ; if ( secondBrace < 0 ) { throw new IllegalArgumentException ( "Couldn't find closing brace for SHA prefix" ) ; } return encPass . substring ( 0 , secondBrace + 1 ) ; }
Returns the hash prefix or null if there isn't one.
Returns the hash prefix or null if there isn t one .