question: public String encryptPassword ( ) { String nonce = getNonce ( ) ; String timestamp = getUTCTime ( ) ; String beforeEncryption = nonce + timestamp + password ; byte [ ] encryptedRaw ; try { encryptedRaw = sha1 ( beforeEncryption ) ; } catch ( NoSuchAlgorithmException e ) { e . printStackTrace ( ) ; return null ; } String encoded = Base64 . encodeBase64String ( encryptedRaw ) ; return encoded ; }
target:  Returns encrypted version of given password like algorithm like in WS-UsernameToken