crypto/src/main/java/org/springframework/security/crypto/password/LdapShaPasswordEncoder.java
public String encode(CharSequence rawPass) {
		byte[] salt = this.saltGenerator.generateKey();
		return encode(rawPass, salt);
	}
public String encode(CharSequence rawPass) {
		byte[] salt = this.saltGenerator.generateKey();
		return encode(rawPass, salt);
	}
public String encode ( CharSequence rawPass ) { byte [ ] salt = this . saltGenerator . generateKey ( ) ; return encode ( rawPass , salt ) ; }
Calculates the hash of password (and salt bytes, if supplied) and returns a base64
encoded concatenation of the hash and salt, prefixed with {SHA} (or {SSHA} if salt
was used).

@param rawPass the password to be encoded.

@return the encoded password in the specified format
Calculates the hash of password ( and salt bytes if supplied ) and returns a base64 encoded concatenation of the hash and salt prefixed with { SHA } ( or { SSHA } if salt was used ) .