public String signCookie ( String str ) { if ( str == null || str . isEmpty ( ) ) { throw new IllegalArgumentException ( "NULL or empty string to sign" ) ; } String signature = getSignature ( str ) ; if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Signature generated for " + str + " is " + signature ) ; } return str + SIGNATURE + signature ; }
Sign the cookie given the string token as input .